AdvancedHMI Software

General Category => Open Discussion => Topic started by: Darrell on September 28, 2017, 08:00:32 PM

Title: scaling
Post by: Darrell on September 28, 2017, 08:00:32 PM
Is there way to scale a value for digital panel meter , really don't have the option of changing the program to do it , that would be
too simple
example  (-32768 to 32767)  to  (-200 to 850)
Title: Re: scaling
Post by: Phrog30 on September 28, 2017, 08:11:41 PM
I think the circular progress bar has an example of this, at least the one I did, I think Archie kept that part in for the public release.
Title: Re: scaling
Post by: Archie on September 29, 2017, 12:20:39 AM
Try these settings:

ValueScaleFactor = 0.01602
ValueScaleOffset = 20284
Title: Re: scaling
Post by: Darrell on September 29, 2017, 10:26:52 AM
this is what I'm trying to do , not a big deal my be a nice option for future releases. In some cases the company will not allow me to change the program
(http://)

this did give me the correct value
thanks archie
Title: scaling
Post by: DougLyons on September 29, 2017, 10:21:06 PM
Maybe it would be good to have the formulas to derive the factors above.

ValueScaleFactor = [(scaled max) - (scaled min)]/[(input max) - (input min)]

ValueScaleOffset = [(scaled min)/ValueScaleFactor] - (input min)

Careful attention to the signs must be utilized to get the correct values for these.