11/20/2016 8:41 PM | |
Joined: 9/27/2006 Last visit: 5/9/2024 Posts: 12257 Rating: (2666) |
Hello gerard; A REAL (floating-point) value is formatted as a 32-bit single-precision variable in Step 7, based on the IEEE 754 standard. This format divided the 32-bit register in 3 parts: the sign bit (on the MSB, bit 31), the mantissa (the decimal part of the REAL value, in bits 30 to 23) and the exponent (bits 23 to 0). So the REAL value is treated in scientific notation. That means that a floating^-point value such as -1.0 will be formatted as: - sign bit + negative; - mantissa: 1 (decimal); -exponent : 0 (actually, exponent 127 means 0, see the Wikipedia link below). This is explained in the online help of Step 7 and in this Wikipedia entry: https://en.wikipedia.org/wiki/Single-precision_floating-point_format You will find it is not very easy for a human brain to take a 32-bit value (in decimal) and translate it to a I/// 754 format to do the conversion. Computer-based systems seem to have no trouble, Hope this helps, Daniel Chartier |
11/21/2016 1:07 AM | |
Joined: 10/7/2005 Last visit: 5/9/2024 Posts: 3005 Rating: (1047) |
Hello gerard32 the logic is doing a valid Floating Point based calculation and it seems it is only your online monitoring display that is eluding you. To fix this, right click on the "Standard" column and select "Floating-Point" for the representation (can also be done individually for ACCU2) |
Cheers |
|
This contribution was helpful to1 thankful Users |
Follow us on