How can we help you today?

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.
Image
As a workaround use string instead of real, In HMI use STRING display, change display length as required, display keypad type as decimal.

Schneider Electric India

Users group

Discuss this topic with experts

Visit our community and get advice from experts and peers on this topic and more
  • Products Documentation
  • Software Downloads
  • Product Selector
  • Product Substitution and Replacement
  • Help and Contact Centre
  • Where to buy
  • Get a Quote
  • Find our Offices
  • Schneider Electric Community
  • Careers
  • Company Profile
  • Report a misconduct
  • Accessibility
  • Newsroom
  • Investors
  • EcoStruxure
  • Job Search
  • Blog
  • Contact support - +1800-103-0011
  • Price List
  • Privacy Policy
  • Cookie Notice
  • Terms of use
  • Change your cookie settings