Recommendations on the naming of identifiers, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 962

Advertising
background image

L-force | PLC Designer

Programming Reference

960

DMS 4.1 EN 03/2011 TD29

• Manager. So you can access a library module or variable by <library

namespace>.<modulename|variablename>. Notice that in case of nested libraries
the namespaces of all libraries concerned have to been stated successively.
Example: If Lib1 was referenced by Lib0, the module fun being part of Lib1 is
accessed by "Lib0.Lib1.fun":
ivar := Lib0.Lib1.fun(4, 5); (* return value of fun is copied to variable ivar in project *)
As far as the checkbox "Publish all IEC symbols to that project as if this reference
would have been included there directly." has been activated within the properties
of the referenced library Lib, the module fun may also be accessed directly via
"Lib0.fun".

AT <address>: The variable can directly be linked to a definite address using the
keyword AT.
In function blocks you can also specify variables with incomplete address statements.
In order that such a variable can be used in a local instance, there must be an entry for
it in the 'Variable Configuration'.
Type: valid Data Type, optionally extended by a ":=<initialization>".
Optionally pragma instructions can be added in the declaration part of an object, in
order to affect the code generation for various purposes.

Note:
Pay attention to the possibility of an automatic declaration.
For faster input of the declarations, use the shortcut mode.

16.1.2

Recommendations on the naming of identifiers
Identifiers are defined at the declaration of variables (Variable names), user-defined
data types and at the creation of POUs (functions, function blocks, programs). In
addition to the items to be regarded anyway when defining an identifier you might
consider to follow some recommendations in order to make the naming as unique as
possible.
See for the naming of identifiers for the following:
• Variable names
• Variable names in »PLC Designer« V3.x Libraries
• User-defined data types (DUT)
• User defined data types (DUTs) in »PLC Designer« V3.x Libraries
• Functions, Function blocks, Programs (POU), Actions
• POUs in »PLC Designer« V3.x Libraries
• Visualization names

Advertising