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

Page 277

Advertising
background image

L-force | PLC Designer

Editors in PLC Designer



DMS 3.2 EN 02/2011 TD29

275

For each particular array- resp. structure or function block element an individual entry
can be pre-defined in the parameter list: For example per each element an own
definition [name=<elementname>] can be specified.

The key definitions of each particular element (all keys of a particular element must

be enclosed by the same square brackets!) are to be arranged in a row, separated by
empty spaces. The definition packages for the elements will automatically refer to the
elements according to the ascending order of the index (Member). If there are not as

many key-definitions available as there are elements in the array resp. the structure or
the function block, then the remaining elements will get assigned the same values as
the last individually defined element (Exception for key "name" for arrays, see below)!
(see example 1b).

Automatisms concerning key "name" when entering arrays in parameter lists:

If you do not specify a name for an array element in the pragma, that element and all
following elements automatically will get the names <POU name>_<Array variable
name>_<corresponding array index number>.
Example: Array variable ARRVAR [1..8] of INT in POU PLC_PRG is to be entered in a
variable list via a pragma; If key "name" is not defined in the pragma, the particular
array elements in the parameter list automatically will be named "PLC_PRG_arrvar_1"
to "PLC_PRG_arrvar_8".

"<name>_<first index number of array range>" for the first array element via the
pragma, the following array elements in the parameter list automatically will be
named “<name>_<corresponding index number>”.
Example: Array variable ARRVAR [1..8] of INT in is to be entered in a variable list via a
pragma; The pragma just specifies [name=xyz_1]“ for the first array element and thus
in the parameter list the following elements automatically will get the names "xyz_2"
to "xyz_8".



Stop!

Do not define a value for the key "Member"; this column will be filled automatically
by using the array index values.

Advertising