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

Page 276

Advertising
background image

L-force | PLC Designer

Editors in PLC Designer

274

DMS 3.2 EN 02/2011 TD29



• Entries in parameter lists of type 'Template' via function blocks and structures

− Pragmas in variable declarations in function blocks and structures can be used

to create entries in parameter lists of type 'Template'. (If the template does not
yet exist, it will be created automatically)
Syntax:

{template list=<name> [ <key>=<value> <key>=<value>
...further keys ] }

Example: Variable strvar, which is an element of structure "stru1", should be
entered in a parameter list "templ1" of type 'Template'; symbolic name
(member) of the entry is "struvar1, the access level is "low" :

TYPE stru :

STRUCT

ivar:INT;

strvar:STRING{template list=vorl1 [member=struvar1
accesslevel=low] };

END_STRUCT

END_TYPE

• Entries in parameter lists of type 'Instance' (for arrays, function block- or structure

variables)
− via declarations in programs or global variable lists

At the declaration of arrays, function block- or structure variables in a program
or in a global variables list directly an parameter list of type 'Instance' can be
created:
Syntax:

{instance list=<name> template=<template>
baseindex=<index> basesubindex=<subindex> [ <key>=<value
for first element > <key>=<value for first element >
...further keys for first element ] | [ <key>=<value
for second element > <key>=<value for second element >
..further keys for second element ] | [keys for
further elements]}

For arrays the key "template" will automatically be defined with the implicitly
available template "ARRAY", for structures and function blocks an appropriate
template must be available in the Parameter Manager and must be part of the
here described declaration.

Advertising