04-13-2010 11:05 PM - edited 04-13-2010 11:09 PM
My hardware is PCI-6023E & BNC-2110. Software is Laview 8.2 & Max 4.6.1
I want to send a counter output within 20ms Using DAQ in labview. Not time dependent, I mean that not every 20ms to send a trigger singal. What I need is that in certain condition I can use DAQ to send a trigger singal to PCI-6023E & BNC-2110. This process required to be finished within 20ms.
I try to use DAQ assistant first, it send a trigger signal very easily. But the processing time is about 100ms( although The rising edge & failling edge set less than 5ms). Then I use other DAQ modulus, the result is the same. The minimum cycle time always around 100ms. My VI as followers.
So How to shorten this time? Whether traditional DAQ can save time, and how?(I am not familiar with DAQ function)
04-13-2010 11:18 PM
Don't create and clear the task in every iteration of the while loop.
Put those functions before and after the while loop.
04-13-2010 11:22 PM
You don't need to do all of the DAQmx functions every single pulse. put the create and stop functions outside the loop and pass the task and error around with shift registers:
04-14-2010 01:30 PM
Thank you for you answer. I modify the programe as you said. But there are two problems. First, The trigger singal only been sent once, I mean the part in the loop seems works once. Second, when I stop the program, thers is error window appear. How to slove thme, thx very much.
04-14-2010 03:09 PM
04-14-2010 09:10 PM
04-14-2010 09:20 PM
04-14-2010 09:42 PM
Open up the example finder (help->find examples) and browse the hierarchy:
Hardware Input and Output > DAQmx > Generating Digital Pulses
there's an example there called Gen Dig Pulse Train - Continuous.vi that I think is exactly what you're trying to do. Example finder can be a useful resource.
04-14-2010 11:07 PM - edited 04-14-2010 11:08 PM
Thx very much. I find this example. But my purpose is different. What I need is to output only one trigger signal when required, not continous one. And from DAQ start to finish need be within 20ms.
Something as followers(but this one doesn't work). (1)The Loop continue running. when swith on, it sending trigger signal(One signal is engough, do not require continous one). When swith off, it do not send trigger singal, or the output remain defalut votage(usually 0V). (2)The running time of this loop need be less than 20ms
04-14-2010 11:21 PM
Do you need to use a counter?
Why not use a digital output that writes out a pulse waveform, or a true, wait a short time, then a false, whenever you hit the button?