TRUNC is an IEC operator in the CODESYS Development System that converts a REAL value into the DINT data type. It keeps only the integer part of the number, discarding the fractional part. For example, TRUNC(1.9) gives 1 and TRUNC(-1.4) gives -1.
| Language | iec 61131 3 |
|---|---|
| Code | TRUNC |
| Dialect | CODESYS |