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

Page 278

Advertising
background image

L-force | PLC Designer

Editors in PLC Designer

276

DMS 3.2 EN 02/2011 TD29



Examples:

Example1a: An array variable arr_1 is declared as described in the following in order to
create a parameter list arrinst of type 'Instance' (if not yet available), in which the
array components get entered, whereby each element first will get a symbolic name
xname_<index number> (could be edited afterwards in the parameter manager) and
the subindex will be counted up by 1 for each entry, starting with 0 (basesubindex).
Accesslevel=low will be applied to all elements.

arr_1: ARRAY [1..8] OF INT{instance list=arrinst
template=ARRAY baseindex=16#0 basesubindex=16#0 [name=xname_1
accesslevel=low] };

Example1b: For an array variable arr_1 just for the elements 1 to 4 already names are

defined via the pragma, the elements 5 to 8 therefore automatically will get the name
of element 4 extended by a Underline and the appropriate index number, i.e.
"xname_5" to " xname_8". Regard that further key-definitions for a particular element
must be entered within the same square brackets as shown here for the first and for
the fourth element regarding the accesslevel:

arr_1: ARRAY [1..8] OF INT{instance list=arrinst
template=ARRAY baseindex=16#0 basesubindex=16#0 [name=aname
accesslevel=high][name=bname][name=cname][name=xname
accesslevel=medium]};

Advertising