LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to shorten the running time of DAQ

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)

 

 Counter output.JPG

帖子被guosiming@sjtu.edu.cn在 04-13-2010 11:09 PM
时编辑过了
0 Kudos
Message 1 of 10
(4,111 Views)

Don't create and clear the task in every iteration of the while loop.

 

Put those functions before and after the while loop.

0 Kudos
Message 2 of 10
(4,100 Views)

 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:

 

task_loop.jpg

-Barrett
CLD
0 Kudos
Message 3 of 10
(4,099 Views)

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.

 

test2.JPG

test.JPG

0 Kudos
Message 4 of 10
(4,058 Views)
Put the "Start Task" function outside the loop also.
0 Kudos
Message 5 of 10
(4,047 Views)
Thank you very much. The error window doesn't display anymore. But the trigger singal still only send once. What could casue this problem?
0 Kudos
Message 6 of 10
(4,033 Views)
Thanks for your answer. I modify the programa as you said. It only send trigger singal once. I want to know why, and how to solve it? Thx very much
0 Kudos
Message 7 of 10
(4,030 Views)

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.

-Barrett
CLD
0 Kudos
Message 8 of 10
(4,021 Views)

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

 

123.JPG

帖子被guosiming@sjtu.edu.cn在 04-14-2010 11:08 PM
时编辑过了
0 Kudos
Message 9 of 10
(4,010 Views)

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?

0 Kudos
Message 10 of 10
(4,005 Views)