博文

目前显示的是标签为“Floating point rounding instruction”的博文

Floating point rounding instruction

Also known as floating-point real number (Real), in STEP 7, expressed as a decimal floating-point number. I read some people say for S7-300 / 400 "ROUND instruction is actually round 6 into 5, if you really want to shed 5 into 4, you can add pre-0.1."      To be honest I have not noticed this last instruction details. To this end first consult the online help instructions:      "ROUND (rounded to a long integer) IN parameter content to read floating-point number and converts it to a double integer (32-bit) result to the nearest integer (rounded to the nearest value). If the float interposed between two integers, the even number is returned. the results output by the parameter OUT. "      We called "rounding to nearest" to rounding. Here are the results of simulation experiment, rounding it seems, there is no 5 round 6 into the problem.      2.49999 input, output 2       2.50...