VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

peak and valley calculation

For calculated channels, there is the peak and valley type. Can someone please explain to me what the calculation is exactly? I originally thought that it would give me the height of the peaks and the height of the valleys, but it doesn't seem to be doing that.

 

Thanks,

Kevin Key

0 Kudos
Message 1 of 6
(7,499 Views)

Hi Kevin,

 

I will look into this further to try and get you a better explanation of actual calculation that is occuring. In the mean time, can you give me some details about what you are currently seeing? What sort of signal are you trying to find the peak and valley for? What are you currently seeing? What kind of channels are mapping the Channel (x), Channel to store valley value (y), and Channel to store offset value (z) parameters to?

 

Any information you could give me would be helpful. Thanks Kevin!

 

Aaron P

National Instruments

Applications Engineer

http://www.ni.com/support

0 Kudos
Message 2 of 6
(7,479 Views)

The signal is a 3.3V PWM signal and I was getting about 1.8 for both the peak and valley.

0 Kudos
Message 3 of 6
(7,475 Views)

Hi Kevin,

 

Can you provide a little more detail please? Hardware setup? What channel is mapped to Channel (x), Channel to store valley value (y), Channel to store offset value (z)?

 

Aaron P

National Instruments

Applications Engineer

http://www.ni.com/support

0 Kudos
Message 4 of 6
(7,458 Views)

y and z are just random user channels I created and x is the PWM signal. The PWM signal is a DAQ AI voltage.

0 Kudos
Message 5 of 6
(7,451 Views)

Hello - 

 

The function reports local minima and maxima of an AC waveform. This graph essentially shows how the function works: 

User channel 0 is the input, Calculated channel is the peak-valley function's calculated channel (reporting the peak), and User Channel 1 is reporting the Valley. 

SteevJobbs_0-1724089272263.png

In other words, it looks for points where the function changes direction (from increasing to decreasing or vise versa) and reflects the value of the input function at that point on the output corresponding to it's direction. 

At the top of the input waveform, the green line updates (after some hysteresis condition is met). Likewise, the yellow line updates when after the configured hysteresis condition is met from the local minima at 159 seconds. 

0 Kudos
Message 6 of 6
(468 Views)