TRUNC
Truncates a real value to have just the integer part.

Arguments | |||
---|---|---|---|
IN | IN | REAL | Any REAL value |
TRUNC | Q | REAL | If IN>0, biggest integer less or equal to the input If IN<0, least integer greater or equal to the input |
Example
(* FBD Program using "TRUNC" Function *)

(* ST Equivalence: *)
result := TRUNC (+2.67) + TRUNC (-2.0891); (* means: result := 2.0 + (-2.0) := 0.0; *)
Provide Feedback