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

Page 45

Advertising
background image

L-force | PLC Designer

What is What in PLC Designer



DMS 3.2 EN 02/2011 TD29

43

These changes therefore play a role only when the same instance is called.

A program declaration begins with the keyword PROGRAM. Regard the
Recommendations on the naming.

If you would like to set input and/or output parameters when you call the program,
you can do this in the text languages IL and 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).

If the program is inserted via input assistant (<F2>) with option With arguments in
the implementation window of a ST or IL POU, it will be displayed automatically
according to this syntax with all of its parameters. But you not necessarily must assign
these parameters.

Examples for program calls:

In IL:

CAL PRGexample2

LD PRGexample2.out_var

ST ERG

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

CAL PRGexample2(in_var:=33, out_var=>erg )

In ST:

PRGexample2;

Erg := PRGexample2.out_var;

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

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

In FBD:

Advertising