FRACT (x). Returns the fractional part of x. The result is positive if x is greater than or equal to zero. The result is negative if x is less than zero.
Syntax:
'external reference' := FRACT(Real value);
Example:
VAR T63; T64; T17; T18; (* Temporary values *) END_VAR; T63 := .5; T64 := 15.803; T17 := FRACT(T63); T18 := FRACT(T64);
The above example shows T63 set to the value of .5 and T64 set to the value of 15.803. T17 is set to the result of FRACT(T63), which is .5 and T18 is set to the result of FRACT(T64), which is .803.