Find a maximum value from sets of RCTIME data
Fairuz
Posts: 12
Hie..
I am interested to get a maximum value from a sets of 20 values of RCTIME data I·read from port and would like to display it·using debug command. I have tried to integrate my RCTIME data with the equation presented in Emesystem... but not able to make it work.
Please assist me.
Thanks
I am interested to get a maximum value from a sets of 20 values of RCTIME data I·read from port and would like to display it·using debug command. I have tried to integrate my RCTIME data with the equation presented in Emesystem... but not able to make it work.
Please assist me.
Thanks
Comments
I am not clear on how the data is being stored or used, but on the fly you can update the maximum value by using the line:
IF value > maxValue THEN maxValue = value
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I'm designing a water turbidity meter. The meter is able to identify the capacity of clay in water with the range of 10mg/L. I am using a proposed design by emesystems under topic, "measuring the small voltage" and integrate it with light sensor "TSLB257" and the system work very well. However, when I debug my output on screen or through Stamp Plot Lite, the output data seems to be fluctuating all the time, so it is hard for me to tell what value of RCTIME is representing the turbidity level of water. So, I decided to take only the maximum value out of all my outputs to represent my actual reading. It is the same like in the Stamp Plot Lite, there is one part that is indicating maximum and minimum value throughout the entire graph shown. What I plan to do is to debug the maximum value from the first 50 output values.
Besides, experimentaly and statistically, I am not pretty sure my idea to use maximum RCTIME value from the entire data is accurate enough to represent the level of turbidity.
I have tried to use the method proposed under the chapter statistics, finding maximum value, but I do not know how to modify the program to fulfill my requirement.
Thanks so much for your assistance
It can also help to do a smoothing low pass filter...
or a straight out average...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com