Trunc, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 497

Advertising
background image

L-force | PLC Designer

IEC Operators and additional norm extending functions



DMS 3.2 EN 02/2011 TD29

495

9.9.9

TRUNC

PLC Designer IEC operator: Converting from REAL to INT. The whole number portion of
the value will be used.

When you perform a type conversion from a larger to a smaller type, you risk losing
some information.

Example in IL:

LD 2.7

TRUNC

GE %MW8

Examples in ST:

i:=TRUNC(1.9); (* Result is 1 *)

i:=TRUNC(-1.4); (* Result is -1 *).

Advertising