LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting the threshold of a real time signal

Solved!
Go to solution

Hello,

 

I am trying to detect the threshold of a real time signal (png file of signal attached).

But, the problem what I am facing is no "count" output.

 

I am not able to figure out what may be going wrong.

 

I am attaching both the signal png and the VI.

 

Thanks.

 

Anupam

 

 

Download All
0 Kudos
Message 1 of 4
(3,338 Views)
Solution
Accepted by topic author anupam2016

Well, its actually rather simple.  Replace the Threshold Detector.vi with a pt-by-pt Threshold detector!  Signal operation>>pt-by-pt>> Signal operation pt-by-pt> Threshold Detector pt-by-pt.vi

 

Then get rid of the from DDT that confused the heck out of you (it is outputting an array of one scalar value !  That makes it REALLY hard to find a instance of 40 consecutive points above threshold in the one element array)  The pt-by-pt version "Remembers" each point and operates on the whole history.


"Should be" isn't "Is" -Jay
Message 3 of 4
(3,321 Views)

Hi anupam,

 

I am not able to figure out what may be going wrong.

The problem is the "FromDDT" function you use without any sense…

You use it to convert a single sample into an 1D array of samples (why not use BuildArray instead)?

And why do you create an array this way? Which kind of counts do you expect when you feed the ThresholdDetector with an array containing just one single sample???

 

Solution: Collect your samples in an array using a shift register with a BuildArray function…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(3,321 Views)

Thanks a ton.

 

It worked !

 

 

0 Kudos
Message 4 of 4
(3,274 Views)