LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Threshold with tolerance

Hi, 

 

I have the envelope of a voltage signal. I would like to apply a threshold on this signal with a tolerance, like 10+/-2. 

I just did a comparison with a equal or more, but I can't find how to put a tolerance. Do you have any idea?

 

Thanks a lot for your help!

 

 

0 Kudos
Message 1 of 9
(4,526 Views)

If you are trying to see if the value is withing a range, then use In Range & Coerce.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(4,518 Views)

It is not exactly what I want. My signal is joined to this post. I want to convert my signal in a binary, but I don't want the very small "jumps". It is to control a device, and it is going to shudder if the threshold detect these ones. Do you see what I mean?

Download All
0 Kudos
Message 3 of 9
(4,511 Views)

Ah, so you want something with hysteresus, like a Schmitt Trigger digital chip.  Give this VI a try.  It should replace your comparison logic.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 9
(4,479 Views)

Well actually, what you sent works, but doesn't give me what I was expected.. I collect data that most of the time goes quickly under the threshold and goes back above. I would like that my program doesn't "see" when it goes quickly under the threshold. And I can't just increase the value of the threshold or I'm going to lose data..

Download All
0 Kudos
Message 5 of 9
(4,471 Views)

@sarahdan wrote:

I would like that my program doesn't "see" when it goes quickly under the threshold. And I can't just increase the value of the threshold or I'm going to lose data..


Then I would add a moving average.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Download All
Message 6 of 9
(4,443 Views)

There are many ways to manipulate / filter / analyse data.   Mean filter, Median filter , all kind of stuff.... But the most wanted and simple 'Do what I think I need'-filter is hard to realize in a general way 😉

 

Please explain in more detail what you need to do.

You measure a signal, please provide a data sample, that helps us to provide ideas and test them. Just copy the graph with the data into a new vi,EDIT- MAKE CURENT VALUES DEFAULT, save and post that vi.

 

If YOU analyse the data, what steps are YOU doing (what rules do YOU apply) to get the result you need?

 

That information is needed to build an algorythm 🙂

 

For me it sound like you need median filter and a quantisation.... or maybe something with a hysteresis or a window like trigger ?

quantil.png

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 9
(4,416 Views)

Hi, 

 

 

I can't send the vi, it is a program I can't share online. 

 

But I can describe my program:

 

I am using Daqmx to receive data from a sensor (Daqmx read, analog input, waveform, N channels and N samples). Then, I collect the offset during 3 seconds. In my real-time acquisition I remove the offset, I do the absolute value, and I filter my data (butterworth low pass, 4th order, cutoff at 10 Hz to have the envelope). I apply a threshold and a RMS to delete the jumps I was speaking about earlier. It seems to work now. But I don't know if what I'm doing is the best way. I am using the Express blocks to filter, remove the offset (Formula) and do the RMS. 

And most of my data are Dynamic Data. 

 

I'm not used to Labview, so if you have advices or suggestions.. I know it is not easy without seeing the vi, I am sorry about that.

 

Thanks for your help!

0 Kudos
Message 8 of 9
(4,389 Views)

Hi, 

 

I can't send the vi, it is a program I can't share online. 

 

But I can describe my program:

 

I am using Daqmx to receive data from a sensor (Daqmx read, analog input, waveform, N channels and N samples). Then, I collect the offset during 3 seconds. In my real-time acquisition I remove the offset, I do the absolute value, and I filter my data (butterworth low pass, 4th order, cutoff at 10 Hz to have the envelope). I apply a threshold and a RMS to delete the jumps I was speaking about earlier. It seems to work now. But I don't know if what I'm doing is the best way. I am using the Express blocks to filter, remove the offset (Formula) and do the RMS. 

And most of my data are Dynamic Data. 

 

I'm not used to Labview, so if you have advices or suggestions.. I know it is not easy without seeing the vi, I am sorry about that.

 

Thanks for your help!

0 Kudos
Message 9 of 9
(4,387 Views)