LTRUNC
The LTRUNC function determines the integral component of a floating point number.
Examples
LTRUNC(2.8) = 2
LTRUNC(-2.8) = -2
Similar functions: TRUNC, FLOOR
Unlike TRUNC, the result from LTRUNC is of type |
FUNCTION LTRUNC : LREAL
Inputs
VAR_INPUT
lr_in : LREAL;
END_VAR
Name | Type | Description |
---|---|---|
lr_in | LREAL | Function parameters of type LREAL |
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v3.0.0 | PC or CX (x86) | Tc2_Math |