I have a problem calculating correct value from Modbus registers of my device where decimal places are implemented by scale factor which is the power of 10.
EG: if actual DC voltage is 50.45V the DC voltage register reads 5045 and DC voltage scale factor register is -2 which translates to 5045*10E-2=50.45
Unfortunatelly the scale factor keeps changing in regard to actual value so fixed scale factor is not an option.
A "dirty" workaround is with a program activated on change of either register values and then calculating via if-then method but it is inefficient and clumsy could be a source of error if program is interrupted.
Is there any other way to do exponentiation in a calculation like i.e.: number ^ exponent = ...
Customer support service by UserEcho