Host Engineering Forum
General Category => General Discussion => Topic started 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
-
Just do a compare A>B then set B=A if true where A is input and B is Peak.
-
INIT N0 = 0
MATH N0 = max(N0, WX0)
INIT N1 = 32767
MATH N1 = min(N1, WX1)
-
thanks you guys are awesome.
-
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.
-
Use N0 in logic in place of WX0. N0 is the peak value. Remember to have a way to reset the peak when appropriate.
-
that worked out really well thanks