Question:
How can rounding errors be avoided when entering values because of the defined linear correction of variables?
Answer:
When creating HMI projects 'excessive' factors are often entered for the scaling of variables in the linear correction. These factors cause rounding errors.
Example:
Values between ±100 should be entered. The code value of the connected controller expects a value between ±1000, however.
Obvious factors for the definition of the linear correction are:
- Device (operating unit):min. -100 max. 100
- Code value: min. -1000 max. 1000
This entry is a correctly calculated value but may result in rounding errors.
The following factors for the linear correction do
not cause rounding errors:
- Device (operating unit): min. 0 max. 1
- Code value: min. 0 max. 10
As the linear correction has no effect on the value range of the variables, negative values are still possible.
CONCLUSION:
For the scaling of variable values, small factors should be entered for the linear correction.