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

Page 499

Advertising
background image

L-force | PLC Designer

IEC Operators and additional norm extending functions



DMS 3.2 EN 02/2011 TD29

497

9.10.2

SQRT

PLC Designer IEC operator: Returns the square root of a number. IN can be type BYTE,
WORD, DWORD, INT, DINT, REAL, SINT, USINT, UINT, UDINT. OUT must be type REAL.

Example in IL:

LD 16

SQRT

ST q (* Result is 4 *)

Example in ST:

q:=SQRT(16);

Example in FBD:

9.10.3

LN

PLC Designer IEC operator: Returns the natural logarithm of a number. IN can be type
BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT, UINT, UDINT. OUT must be type
REAL.

Example in IL:

LD 45

LN

ST q (* Result is 3.80666 *)

Example in ST:

q:=LN(45);

Example in FBD:

Advertising