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

Page 644

Advertising
background image

L-force | PLC Designer

PLC Designer Libraries

642

DMS 3.2 EN 02/2011 TD29



Example in ST:

VarSTRING1 := CONCAT ('SUSI','WILLI');

Note!

The CONCAT function does not work, if nested over more than five levels.



Stop!

String functions are not "thread safe": When using tasks, string functions may only
be used in a single task. If the same function is used in different tasks, there is a
danger of overwriting.

INSERT

Provided by standard.lib.

INSERT inserts a string into another string at a defined point.

The input variables STR1 and STR2 are type STRING, POS is type INT and the return
value of the function is type STRING.

INSERT(STR1, STR2, POS) means: insert STR2 into STR1 after position POS.

Example in IL:

LD 'SUSI'

INSERT 'XY',2

ST VarSTRING1 (* Result is 'SUXYSI' *)

Example in FBD:

Advertising