Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I control loop execution rate with a bit intead of timer

I would like to trigger data aquisition from an analog signal.  I am currently using a while loop with the wait millisecond timer to trigger when data gets captured.  I would like to remove the timer and use a digital bit that is controlled by an encoder count.  I have not been able to get a digital bit to work without the timer present.
0 Kudos
Message 1 of 3
(3,062 Views)

If you have LabVIEW 8.0 you can use the timed loop.  There are several examples which illustrate what you are trying to do.  If you are using 7.x then I think you could use your bit as an external clock and then time your acquisition using that external clock.

 

StuartG

0 Kudos
Message 2 of 3
(3,045 Views)
Hi Tomr,
 
Taking a step back, what DAQ card are you using? Many of our cards support Analog triggering, so you could just use the hardware to trigger your acquisition. This KB documents which cards have analog triggers. Check out the "Cont Acq&Graph Voltage -Int Clk -Analog Start.vi" from example finder for how to do analog triggering. This would allow you to start the vi, but you would not be acquiring until your input reached a specified level. Also, if you have an encoder that asserts a bit high (TTL) when you want to start acquisition, you could also use a digital trigger to start acquisition. You can use that same example and change the trigger from an Analog Trigger to a Digital Trigger.
 
Hope this helps,
Andrew S.
National Instruments   
0 Kudos
Message 3 of 3
(3,011 Views)