Shortcut mode, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual
Page 970

L-force | PLC Designer
Programming Reference
968
DMS 4.1 EN 03/2011 TD29
16.1.7
Shortcut Mode
The declaration editor as well as other text editors where declarations are done,
support the "shortcut mode".
This mode is activated when you end a line of declaration with
allows to use shortcuts instead of completely typing the declaration.
The following shortcuts are supported:
• All identifiers up to the last identifier of a line will become declaration variable
identifiers
• The type of declaration is determined by the last identifier of the line. In this
context, the following will apply:
B or BOOL
results in
BOOL
I or INT
results in
INT
R or REAL
results in
REAL
S or string
results in
STRING
• If no type has been established through these rules, automatically BOOL is the type
and the last identifier will not be used as a type (see below: example 1).
• Every constant, depending on the type of declaration, will turn into an initialization
or a string (see below: examples 2 and 3).
• An address (as in %MD12) is extended by the "AT" attribute (see below: example 4).
• A text after a semicolon (;) becomes a comment (see below: example 4.).
• All other characters in the line are ignored (see below, e.g., the exclamation point in
example 5.).
Examples:
Shortcut
Declaration
(1)
A
A: BOOL;
(2)
A B I 2
A, B: INT := 2;
(3)
ST S 2; A string
ST:STRING(2); (* A string *)
(4)
X %MD12 R 5 Real Number
X AT %MD12: REAL := 5.0;(* Real Number *)
(5)
B !
B: BOOL;