FRAC

FRAC 1:

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

FRAC 2: Inputs

VAR_INPUT
    lr_in : LREAL;
END_VAR

Name

Type

Description

lr_in

LREAL

Function parameters of type LREAL

FRAC 3:

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86)

Tc2_Math