Floating Point calculation leads to a wrong result

Which products are affected?
ESP-HMI1-P (HMI Designer Version 1.2 and higher)

What happens?
In direct commands and equations mathematical calculations with variables of the Floating Point type lead to incorrect results.

When does the problem occur?
In the Variable project component the data type can be determined when a variable is defined. It is differentiated between integer (Dword), floating point (xxx.x; xxx.xx; xxx.xxx) and character strings (String). In case of variables of floating point type an automatic scaling 1:10000 is executed. Consequently, the linear scaling for fixed points (FIXED32) is automatically executed.

If for variables of the floating point type a Linear scaling is defined additionally in Limit values tab for the further scaling of the value, this leads to incorrect results in direct commands and equations when mathematical calculations are made.

Possible diagnostics?
None.

Short-term measures / recommendations?
  • Do not use any additional scaling in case of variables of the Floating Point type. In case of these variables set the Linear scaling to None in the Limit values tab of the Variables project component.
  • If a user-defined scaling of a variable is required, set Dword as data type instead of a floating point for this variable. The variables on that page will then be displayed in fixed point format.

Evaluation:
Under certain circumstances mathematical calculations with variables of the floating point type lead to incorrect results. This function restriction is detected during commissioning at the latest. The Linear scaling is used rather seldom in case of variables of the floating point type.

URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/200504806/1/
Kontaktformular