SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop an acquisition when the signal reached a certain value?

Hi everybody,

 

I'm just starting using my DAQ 9201 and I'm clearly unfamiliar with the trigger systems. What I need is to record 3 analog channels (i.e. 0:2, 0 is DC and 1:2 are AC) 1KHz and stop the aquisition when the value on channel 0 reaches a threshold. The application I wrote work more or less up to 10Hz but not for higher sampling rate.

I'd be very thankful if somebody could show me how to use labview correctly for this sort of application as I'm running out of time to finish this project.

 

Thanks a lot,

 

Olivier   

0 Kudos
Message 1 of 2
(5,870 Views)

Hi OD,

 

If your goal is to just have samples up to the point at which channel 0 crosses the threshold then you could use the method that you are currently using to acquire the data and then perform some post-processing after the while loop to remove any extra samples that occured after the threshold was reached.

If you just want to make the while loop execute faster then I would recommend using the individual lower-level DAQmx VIs to configure the acquisition task before the while loop and perform the DAQmx read in the loop. This will have a lower overhead than calling the Express VI every loop iteration. It probably won't be fast enough for the loop to execute at 1kHz, but it will improve the loop speed.

Finally, you could configure a Pause Trigger for the acquisition task triggered when the channel 0 value is above the threshold. I would recommend reading the DAQmx Help explanation about Puase Triggers for more information.

 

If you are new to LabVIEW I would highly suggest starting with the shipping examples or searching on our developer zone community for VIs such as Continuously Acquire Analog Signals Using a Digital Start and Stop Trigger and DAQmx Stop Trigger.

 

Thanks

Ryan T
National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(5,862 Views)