LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to give a true if the value in the waveform is above some threshold?

hai

I'm acquiring a signal using the analog port. I need to compare this
signal with a threshold (eg. 2V) and give out a notch if the signal
voltage goes above this threshold. I want to obtain the signal
continuously but, I want to compare it only every 1ms.

How can I do this?

Thank You,

Siva.
0 Kudos
Message 1 of 5
(2,376 Views)
first of all what version of labview do you have.Always post this. Second if you have labview 7.x then you can use the mask and limit express vi and it will do this very nicely. Search the examples there are a few to show how to do the timing.

HOPE THIS HELPS

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 5
(2,376 Views)
Hi Siva, I suppose you already checked "Waveform scalar limit comparison" in "Waveform" -> "Analog waveform" (LV 7.x). This is to do that, and there are a couple ways to do the same, but this works fine for me.

Hope this help,

JFT
0 Kudos
Message 3 of 5
(2,376 Views)
Hi,

For every Read, are you acquiring a single point, an array of N points, or a waveform of N points?

If you are acquiring a single point for every Read, you can write the point to an indicator in the main loop. Then in a parallel while loop (with a 1ms delay) you can compare the value of the indicator using a local variable.

If you are acquiring an array of N points for every Read, you can write the array to an indicator in the main loop. Then in a parallel while loop (with a 1ms delay) you can compare the maximum value (using Array Max & Min) of the array indicator using a local variable.

If you are acquiring a waveform of N points for every Read, you can write the waveform to an indicator in the main loop. Then in a parallel while loop (with a 1m
s delay) you can compare the values of the waveform indicator using a local variable and the Waveform Scalar Limit Comparison.vi. For more information on the Waveform Scalar Limit Comparison.vi refer to it's context help.

I hope this helps!

Travis H.
National Instruments
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 4 of 5
(2,376 Views)
thanx for the reply. i was using labview 7.1.
that was a good solution but still somehowm i'm not able to get the
output continiously.

siva.

JFT' wrote in message news:<5065000000050000003AD70100-1079395200000@exchange.ni.com>...
> Hi Siva, I suppose you already checked "Waveform scalar limit
> comparison" in "Waveform" -> "Analog waveform" (LV 7.x). This is to
> do that, and there are a couple ways to do the same, but this works
> fine for me.
>
> Hope this help,
>
> JFT
0 Kudos
Message 5 of 5
(2,376 Views)