Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-DIO-32HS: Write data once, trigger many?

Hi, and apologies in advance for my very basic LabView knowledge. I'll be asking about a specific card, PCI-DIO-32HS, and how to set up a certain functionality from LabView. If this is the wrong forum, please move my post, or tell me.

I am simultaneously trying to learn about LabView, and the PCI-DIO-32HS card with the objective of enhancing the performance (digital sequences generated per second) of the system, so I'm turning to the forum for help on whether or not what follows is possible, and where I might learn more about doing it.

Consider a main VI panel tasked with carrying out an experiment. Each experiment is a digital sequence (16 bits wide) sent out from the PCI-DIO-32HS. Each line goes to a different physical object, and the whole experiment is over in a fraction of a second. The trigger is set out to be a digital input line, coming from a specific instrument. Triggering must come from this instrument.

If one wishes to repeat the experiment 50 times, with the exact same parameters, then as things are now, it would seem that the PCI-DIO-32HS card is being set up and  having the full data set transferred to it over and over. This limits the amount of experiments that can be done per second.

I would like to find a way to set up the card with my data and triggering info once, and just have the card spit out the digital sequence whenever it detects the trigger, over and over.

The complication is that what is currently implemented uses the Legacy DAQ VIs, whereas I would like to bring everything up to DAQmx.

This is LabView 8.5.1.

If you need more info, just ask.

So, in summary: can this be done? How can I learn how to do this?

Thanks in advance.

Paul
0 Kudos
Message 1 of 7
(3,026 Views)
Hi Paul,

You seem to have a pretty good grasp of what is happening. While I am not exactly sure about the code you currently have, I can help point you in the right direction. You can set up your digital task and have all of the resources reserved with the data in the buffer of the card so every time a trigger is received, you can have it update. If the trigger is periodic, you can use that signal as your sample clock. A good place to learn how to accomplish this is in examples. The Example Finder can be accessed through the Help menu in LabVIEW. A DAQmx example which may help in this situation can be found browsing by task under Hardware Input and Output » DAQmx » Digital Generation » Cont Write Dig Port-Ext Clk.vi. This example shows how to configure everything and have your data be written to the digital channel when the next clock edge (trigger) arrives. You can also find more information about DAQmx in this article or in the DAQmx Help.

Regards,
Kent
Applications Engineer
0 Kudos
Message 2 of 7
(3,009 Views)
Hi Kent,
You can set up your digital task and have all of the resources reserved with the data in the buffer of the card so every time a trigger is received, you can have it update. If the trigger is periodic, you can use that signal as your sample clock. A good place to learn how to accomplish this is in examples. The Example Finder can be accessed through the Help menu in LabVIEW. A DAQmx example which may help in this situation can be found browsing by task under Hardware Input and Output » DAQmx » Digital Generation » Cont Write Dig Port-Ext Clk.vi. This example shows how to configure everything and have your data be written to the digital channel when the next clock edge (trigger) arrives. You can also find more information about DAQmx in this article or in the DAQmx Help.

I set up a different card on another computer, a NI PCI-6289 and its BNC-2110 output connector, so as to be able to experiment with a real card (I don't want to disturb the current PCI-DIO-32HS setup on the main computer, and I had been using a virtual DAQ previously).

The example you suggested is a step in the right direction: using an oscilloscope's two probes I checked that a clock signal (a hand-triggered switch to +5V on PFI0) does indeed present the 2-bit data at P0.0 and P0.1. However, this isn't exactly what I was looking for. I was hoping a single rising edge would write out the whole buffer in one go, at a sample rate determined previously.

I am attempting to modify the example by adding a triggering VI, but I get an error when I try to run the VI:

Error -200452 occurred at Property Node DAQmx Trigger (arg 1) in DAQmx Start Trigger (Digital Edge).vi:2->Cont Write Dig Port-Ext Clk.vi
Measurements: Specified property is not supported by the device or is not applicable to the task.
 Start.TrigType


The Start Trigger VI has PFI0 as the source, Rising Edge as the trigger type, and is wired up properly.

This is for the following sequence of VIs: Digital Output -> Sample Clock -> Start Digital Edge -> Digital 1D U32 1 Chan N samp -> Start Task -> etc.

Thanks in advance,

Paul


Message Edited by Mr-Ions on 06-20-2008 05:51 PM
0 Kudos
Message 3 of 7
(3,002 Views)
I'm going to look at other examples. The unmodified Write Dig Chan-Int Clk-Dig Start.vi example gives the same error. Maybe this is indeed due to the card I am using.

Paul
0 Kudos
Message 4 of 7
(2,999 Views)
Hi Paul,

Thanks for the clarification of what you are trying to accomplish. The card that you are currently using does not support triggered digital tasks. The PCI-DIO-32HS (PCI-6533) does allow triggered digital tasks, but they will not cannot be retriggerable which seems like what you are looking for. One way to get around this is to use an external clock which is retriggerable. You can use a counter on the PCI-6289 to generate a gated pulse train which will act as the clock for the continuous digtial task on the PCI-6533. If you connected the two PCI cards together using a RTSI cable to allow signals to be transferred between the two, you could just run two examples to accomplish what you are trying to do. The first example is called Gen Dig Pulse Train-Finite-Retriggerable.vi and can be found browsing by task under Hardware Input/Output » DAQmx » Generating Digital Pulses.  The second example is Cont Read Dig Chan-Ext Clk.vi and can be found under Hardware Input/Output » DAQmx » Digital Measurement.

Regards,
Kent
Applications Engineer

0 Kudos
Message 5 of 7
(2,964 Views)
Hi Kent,

Thanks for your reply. Your suggestion sounds good.

It seems that the plan now is to do the following:

- Procure a method of generating re-triggerable pulse trains that can be triggered externally (from a physical source) . You suggested the PCI-6289, though I'm going to have a go with a pair of digital delay / pulse generators first. It seems like I will have to daisy chain them, since the burst count for a single generator is not high enough to drive out all the samples required for a full single experiment. This would avoid having to work with two cards, but I will definitely look into your RTSI suggestion.

- Use said pulse trains as an external clock to drive the data out (in continuous out mode) from the PCI-DIO-32HS to the experiment. The data length will exactly match the number of clock pulses, and so the data buffer on the PCI-DIO-32HS will loop around on the next set of clock pulses, whenever they arrive.

That way, each experiment can be triggered off the 60 Hz line, over and over, at the same phase point as previous experiments. LabView would then control the "trigger inhibit" line on the pulse generators, thus controlling how many experiments are done in total.

Thanks again,

Paul


Message Edited by Mr-Ions on 06-24-2008 03:01 PM
0 Kudos
Message 6 of 7
(2,948 Views)
Ok, my digital pulse generators are not externally triggerable in burst mode. So I'll now investigate your suggestion.

Cheers,

p.
0 Kudos
Message 7 of 7
(2,942 Views)