Machine Expert Real Block conversion Issue
Issue - In Machine Expert PLC shows inconsistent behavior when handling large decimal values while using the REAL data type or converting from LREAL to REAL. Values such as 123456789.123 are either automatically rounded or some decimal digits are not accepted. Since the HMI does not support LREAL tags, the value must be entered through the HMI using REAL, resulting in loss of precision.
Resolution :
When converting a LREAL to a REAL, some info/precision can be lost due to the mantissa and exponent coding. For a REAL (32 bits), the mantissa is coded on 23 bits while for a LREAL (64 bits), it is coded on 52 bits. Regarding the exponent, it is also different => it is 8 bits for the REAL while it is 11 bits for the LREAL. In addition, for certain real numbers the representation is infinite and cannot be represented exactly by a computer.
For example, the decimal number 1.2 has an infinite binary representation.
As a workaround use string instead of real, In HMI use STRING display, change display length as required, display keypad type as decimal.