LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read DAQmx analog input channels only when a analog trigger channel is high and stop reading when it is zero

Hi,

 

I would like to start reading several analog input channels (via SCXI 1120D card on a PXI 1010 chassis) when a analog trigger channel hits a specific trigger level and stop the read when the trigger channel falls below the trigger level.    I have tried to use things like Pausing analog reading outside the window with little success.   I am attaching a pdf file showing my last attempt.

 

 

I would appreciate any suggestions,

 

Thanks

Jimmy D.

0 Kudos
Message 1 of 4
(3,139 Views)
Im pretty new myself to this but, would it be possible to place your daqmx read vi inside a case structure and use your trigger analog input via some simple logic to switch this case structure only when the channel is high.
0 Kudos
Message 2 of 4
(3,119 Views)

Hi Jimmy,

 

You can start and stop a read task using software commands and logic in LabVIEW using alanled's suggestion, but this will be a few milliseconds off due to the nondetermanistic delay inherent in all operating systems.

 

If you want a more precise solution using hardware timing, then I would reccomend that you use a reference trigger to be your stop trigger.

 

You can read a KB about this process here

 

In the example attached to the KB, you can replace the digital edge start trigger with an analog edge trigger and the digital edge reference trigger with an analog level reference trigger.

 

Hope this helps!

 

-Abram

0 Kudos
Message 3 of 4
(3,093 Views)
Instead of using the DAQmx Start Trigger as Start Analog Edge, change it to Start Analog Window and set the Window Top and Window Bottom inputs.  I think this should do what you want.
Modified Cont Acq&Graph Voltage-Int Clk-Analog Start.vi from the examples
Message Edited by rpursley8 on 05-18-2009 12:50 PM
Randall Pursley
Message 4 of 4
(3,088 Views)