11 atan, 12 expt, 3 string functions – Lenze DDS v2.3 User Manual

Page 299: 1 len, 2 left, Left, Drive plc developer studio

Advertising
background image

Drive PLC Developer Studio

IEC 61131-3 Standard functions

14-7

l

DDS EN 2.3

14.2.11

ATAN

Returns the arc tangent (inversion of tangent) of a number in radians

Examples
IL

ST

FBD

LD 0.5
ATAN
ST q (* q=0.4636476 *)

q:=ATAN(0.5);

14.2.12

EXPT

Exponentiation of one variable with another:

OUT = IN1

IN2

OUT

is of type REAL.

IN1

and

IN2

can be of type BYTE, WORD, DWORD, INT, DINT, REAL.

Examples
IL

ST

FBD

LD 7
EXPT 2
ST var1 (* var1=49 *)

var1:=EXPT(7,2);

14.3

STRING functions

Note!

The permissible string length is dependent on the applied automation system.
If the length is exceeded, an error message will be displayed in online mode.

14.3.1

LEN

Returns the length of a string

STR

is of type STRING, the return value of the function type INT.

Examples
IL

ST

FBD

LD ’SUSI’
LEN
ST Var1 (* Var1=4 *)

Var1:=LEN(’SUSI’);

14.3.2

LEFT

Returns a left start string of a string

STR

is of type STRING, SIZE of type INT, the return value of the function type STRING.

LEFT(STR,SIZE)

means: Take the first SIZE characters from the left in the string STR.

Examples
IL

ST

FBD

LD ’SUSI’
LEFT 3
ST Var1 (* Var1=’SUS’ *)

Var1:=LEFT(’SUSI’,3);

Show/Hide Bookmarks

Advertising