L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 70

Advertising
background image

L-force | PLC Designer

Concepts and Base Components

68

DMS 4.1 EN 03/2011 TD29

If you want to set input and/or output parameters in the course of a program call, you
can do this in text language editors (e.g. ST) by assigning values to the parameters
after the program name in parentheses. For input parameters this assignment takes
place using ":=" just as with the initialization of variables at the declaration position,
for output parameters "=>" is to be used; see for an example below.
If the program is inserted via input assistant with option Insert with arguments in the
implementation window of a text language editor, it will be displayed automatically
according to this syntax with all parameters. Though you not necessarily must assign
these parameters.

Examples for program calls:
In IL:

or with assigning the parameters (input assistant "With arguments", see above):


In ST:
Note that in contrast to V2.3 the brackets are obligatory!

PRGexample();
erg := PRGexample.out_var;

or with assigning the parameters (input assistant "With arguments", see above):

PRGexample(in_var:=33, out_var=>erg );


In FBD:

Advertising