rswolff Posted July 20, 2016 Report Posted July 20, 2016 Siemens S7-300........I can convert from INT to DI.....and from DI to REAL. I don't see any standard method of going backwards from REAL to DI and from DI to INT My actual application needs to go from REAL to INT (DI to INT is kinda dumb) Thanks, Bob Quote
Moggie Posted July 20, 2016 Report Posted July 20, 2016 RND (conversion of a 32-bit IEEE floating-point number to 32-bit integer) interprets the contents of ACCU 1 as a 32-bit IEEE floating-point number (32-bit, IEEE-FP). The instruction converts the 32-bit IEEE floating-point number to a 32-bit integer (double integer) and rounds the result to the nearest whole number. If the fractional part of the converted number is midway between an even and an odd result, the instruction chooses the even result. If the number is out of the permissible range, then the status bits OV and OS are set to 1. The result is stored in accumulator 1.Conversion is not performed and an overflow indicated in the event of a fault (utilization of a NaN or a floating-point number that cannot be represented as a 32-bit integer number).) Quote
rswolff Posted July 24, 2016 Author Report Posted July 24, 2016 thanks.......thats what I needed. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.