Hi,
I guess I'm a bit confused by your somewhat "conflicting" numbers.
In your original post you said that the input value ranged from 92 from to 466 but that a full scale output (127) should be reached with an input value of 364.
So, I need to convert the 92 and 364 to 1% or 100% respectively and apply to 127 to get a new tap setting
Think of the ** operator as kind of like multiplying by units of 1/65536. With an input value of 920 (given we stick with the times ten accumulated result) the output value would (should) be 920 * (3060/65536) = 42 and with an input value of 3640 the output value will be 3640 * (3060/65536) = 169. Subtract 42 from the two numbers and you'll get 0 and 127 respectively. Note that it's 3060, not 3020.

Is that not what you wanted? Or is that what you wanted but it doesn't actually give you those results - which is possible as I haven't tested it here. Please clarify.

The */ operator is similar to the ** operator but instead of units of 1/65536 it's units of 1/256. The // operator is modolus or remainder. If you do 123//10 you'll get 3 which is the "left over" from 123/10. They have been covered multiple times on the forum and they are covered in the manual.

/Henrik.