Host Engineering Forum

General Category => General Discussion => Topic started by: maciek on March 05, 2020, 08:32:00 PM

Title: PEAKING
Post by: maciek on March 05, 2020, 08:32:00 PM
is there an easy way take a reading for example of an analog input and capture the "peak" or the highest number that channel got to.
And if there is a highest number is there a way for capturing the lowest number
Title: Re: PEAKING
Post by: Garyhlucas on March 05, 2020, 09:45:51 PM
Just do a compare A>B then set B=A if true where A is input and B is Peak.
Title: Re: PEAKING
Post by: BobO on March 05, 2020, 11:43:42 PM
INIT N0 = 0
MATH N0 = max(N0, WX0)

INIT N1 = 32767
MATH N1 = min(N1, WX1)
Title: Re: PEAKING
Post by: maciek on March 06, 2020, 10:13:46 PM
thanks you guys are awesome.
Title: Re: PEAKING
Post by: maciek on March 14, 2020, 12:36:12 PM
adding to my first question is there a way of only reading the peak and when it falls below the peak it still shows the highest point.
Title: Re: PEAKING
Post by: Controls Guy on March 14, 2020, 05:54:08 PM
Use N0 in logic in place of WX0.  N0 is the peak value. Remember to have a way to reset the peak when appropriate.
Title: Re: PEAKING
Post by: maciek on March 28, 2020, 01:08:04 PM
that worked out really well thanks