Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Maximum value (http://www.chiefdelphi.com/forums/showthread.php?t=101997)

hsekhon27 04-02-2012 20:54

Maximum value
 
If a potentiometer is turned clockwise and then counterclockwise, is there any way of finding the highest degrees it turned?

Mark McLeod 04-02-2012 21:01

Re: Maximum value
 
Implementation depends on the language, but in general you just save the maximum value.
Do a comparison of new values against the old maximum value (start w/ a maximum of zero), if the new value is greater, then it becomes the maximum value.

Here's a generic LabVIEW example (replace the dice with the analog input).


All times are GMT -5. The time now is 00:44.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi