Chapter 5 Arithmetic instructions
106 Rockwell Automation Publication 2080-RM001D-EN-E - February 2015
TRUNC truncates Real values, leaving just the integer.
Arguments
Parameter
Parameter
Type
Data Type Description
EN Input BOOL Function enable.
When EN = TRUE, perform the truncation of Real value computation.
When EN = FALSE, there is no computation.
IN Input REAL Any Real value.
TRUNC Output REAL If IN>0, biggest integer less or equal to the input.
If IN<0, least integer greater or equal to the input.
ENO Output BOOL Enable out.
TRUNC function language examples
Function block diagram
Ladder diagram