FRAC
The FRAC function determines the decimal component of a floating point number.
Examples
FRAC(2.8) = 0.8
FRAC(-2.8) = -0.8
FUNCTION FRAC : LREAL
VAR_INPUT
lr_in : LREAL;
END_VAR
lr_in : Function parameters of type LREAL
Development environment | Target system type | PLC libraries to be linked |
---|---|---|
TwinCAT v2.9.0 build 1000 onwards | PC or CX (x86) | TcMath.Lib |
TwinCAT v2.10.0 Build >= 1301 | CX (ARM) |