03-10-2012 02:54 PM
I am trying to set an upper thresthold of 2.75 on the y-axis. what is wrong that the chart wont display it. It is problem a problem in my code so I have attached it
Thank you
03-10-2012 03:01 PM
Well, what is wrong is that you did not use the output of the Threshold Detector in any way to affect the chart.
It is not clear what you mean by "set a threshold... on the y-axis." Do you want to make a mark on the chart at the threshold level? Do you want to limit the array values so that they cannot exceed the threshold? What do you want to do with elements which are above the threshold?
Lynn
03-10-2012 03:18 PM
Sorry i'm new to LabVIEW so I'm abit rought!! What i am trying to do is set a threshold at 2.75 when the waveform goes above that threshold the user will be notified and the graph will count the amount of times the graph went into therhreshold zone.when it stays below the 2.75 everything is ok.
Maybe the threshold detector isnt the best thing to use. what do you think?
Ails
03-10-2012 09:15 PM
Ails,
I am still not sure exactly what you want to do. Depending on how clean your signal is you may be able to use the Threshold Detector.vi to determine the number of places the signal is above the threshold.
To determine which data points are above the threshold is somewhat different. Simply testing each point to see if it is greater than the threshold may be enough.
Look at this VI to see if it gives you any useful ideas.
Lynn
03-10-2012 09:30 PM
03-10-2012 10:12 PM
Ails,
The Threshold Detector.vi will count the number of times the signal exceeded the threshold. If you signal is noisy and near the threshold you could get a very high count.
For the Overpressure indicator just wire an LED to the output of a >? comparision. Connect the data to one input and the threshold to the other.
Lynn
03-11-2012 04:36 AM
Lynn
the light part works now I just need the threshold line at 2.75
Your threshold.vi is similar to what I am looking but I just looking for it to say that the threshold was passed 3 times instead of count all the points like the threshold.vi does. Also once its below the threshold I dont really care about the signal. do you think the threshold vi is the right thing to use?
Ails
03-12-2012 01:43 PM
Count seems to count the number of times the signal crosses the threshold in the positive going direction. Is that not what you want? In my VI the sine signal has three peaks above threshold with about 12 data points in each peak. The count output shows 3. If your signal has a lot of noise near the threshold, you may see extra counts.
To draw a line at the threshold jsut create an array with the same number of elements as your data and make all the elements = threshold. Initialize array will do this for you in one step. Use Build Array to make a 2D array with the data in one row and the threshold array in the other.
Lynn