Here’s what more than 2,500 business decision-makers around the world say.Download the report
...with the Facility Hero app in hand! Discover how you can optimize your maintenance efforts today.Learn more
Access tailored services, 24/7 self-service and expert help. Anywhere, anytime, any project.Discover now
Everything you need to know about our IoT technology backbone.Learn more
Welcome to the Schneider Electric Global Website×
Goals and Symptoms
To achieve proper rounding when converting REAL numbers to INT using Unity.
Facts and Changes
The ZEF file was created using Unity Version 7.0
Causes and Fixes
Attached are two documents. One is a PDF created from Unity Help explaining how the IEC 559 rounding works and the other is a ZEF file of an example REAL to INT conversion that will work as the customer might expect. You can run it in the simulator. It first uses a block to ADD 0.5 to the REAL number and then uses a REAL_TRUNC_INT on the result. Using this, the x.5 will always round up to the next number.