This function block will convert a decimal number into an integer.


The value at the input is rounded depending on the parameter R and is then output at TQ.

R = 0 The value is always rounded down.
R = 1 The value is rounded up if the first decimal place value is more than 5.


In this example R is set to 0 in the top block and you can see the value is always rounded down, at the bottom block R is set to 1 and the value is rounded up as it is over .5.

Config Integer