Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto stop at Nth continuous square cycles whose amplitude exceeds a threshold

HI all,

I am getting high freq Sqaure waveforms into my DAQ card.  The waveform starts at low amplitude but will undergo a jump that are of concern,  I'd like to stop running LabView automatically when it's detected that there are N continuous square cycles whose amplitude exceeds a threshold y.  I use a DAQ card having 2 counters, and frequency is within its limit.

 

Any help would be highly apprecciated. Thank you.

 

-Ian

0 Kudos
Message 1 of 3
(3,013 Views)

Hello,


Unfortunately you can't use a counter to count how many times a signal exceeds a threshold value unless the threshold corresponds to digital logic (5V TTL for example). It sounds like you are describing counting an analogue trigger with hysteresis. If you could be very descriptive about what your end goal is, it might be useful in order to provide the best possible advice.

 

http://www.ni.com/white-paper/4329/en/

 

I hope this helps,

Eric E.

0 Kudos
Message 2 of 3
(2,993 Views)

Hello,

 

You would need to use the data that you read in the analogue voltage task to trigger the stop button on the while loop around the DAQmx Read VI loop to stop. I believe your code would read something like this:

 

Once the data being read crosses my first threshold, look for the data to cross the next higher threshold. If it does, then update my counter by one. Once the data is below that first threshold, then you can start our 2nd threshold test again. With an "Equal?" comparison VI we can check if the counter is equal to a certain value (N). The output of the comparison will be wired to the while loop stop button.

 

I hope this helps,
Eric E.

 

0 Kudos
Message 3 of 3
(2,976 Views)