LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BOOLEAN expression for fluctuating signal

I want to create a BOOLEAN expression to return a TRUE for a signal that is increasing and FALSE for a signal that is decreasing. Any idea how this can be done?
0 Kudos
Message 1 of 8
(4,754 Views)

You didn't mention what the 'signal' is. Here is a VI that may do what you want.

 

 

Download All
0 Kudos
Message 2 of 8
(4,739 Views)
Hi Lavezza,

Thanks for the effort. My signal that I have in mind is a triangular waveform. I tried out your suggested vi and basically it enable me to do the job already. Thanks
0 Kudos
Message 3 of 8
(4,727 Views)

take the derivative of the signal and test for positive.  the simple method is to get a derivative is to subtract Sig(t) to Sig(t-1).  if your signal is noisy, lost of High Frequency you can ater a moving average of a few points and then take a derivative.  There are lost of Waveform functions for filtering and analyzing a signal.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 8
(4,716 Views)
take for example my signal is a triangular wave. How can I program it to stop operation after let say 20 rounds of complete period
0 Kudos
Message 5 of 8
(4,644 Views)
Assuming you use a while loop, you just check the iteration terminal. Presumably you can calculate how many points are in your 20 periods worth of data.
 
You can also use a FOR loop and feed it an autoindexed array of 20 periods. Attached is a quick example (LAbVIEW 7.1).
0 Kudos
Message 6 of 8
(4,631 Views)
I am thinking of using the peak/valley detector. Let say after 20 detected peaks, it'll send the TRUE command to stop the while loop.

I cannot know the number of points in my signal, thus using the iteration number is not possible.
0 Kudos
Message 7 of 8
(4,627 Views)
Hi,
 
Just use the '#found' output of the Peak detector vi, and keep a track of this in each iteration of the while loop. Once the cumulative value equals 20 (or more) stop the while loop
 
See attached jpeg for an idea of how this could be done.
 
Regards
Hannah
NIUK & Ireland
0 Kudos
Message 8 of 8
(4,608 Views)