12 at declaration, 13 syntax colouring, At declaration – Lenze DDS v2.3 User Manual
Page 137: Syntax colouring, Drive plc developer studio

Drive PLC Developer Studio
Editors
7-15
l
DDS EN 2.3
7.2.11.1
Types for variable declaration
Icon:
-
Menu:
InsertWTypes
Keyboard:
-
Use this command to display a selection of types available for variable declaration.
•
Use of the Help Manager will also display this list.
The types are divided into the following categories:
•
Standard types ( BOOL, BYTE, etc.)
•
Defined types (structures, enumeration types, etc.)
•
Standard function blocks (for the declaration of instances)
•
Defined function blocks (for the declaration of instances)
The DDS supports all IEC 61131-3 standard types.
7.2.12
AT declaration
If the variable is to be directly linked to a certain address, the variable must be declared with the
keyword AT.
The advantage of such an approach is that an address may be assigned a more explicit name, and
that any changes to an input or output signal need be made at one location only (in the declaration).
Tip!
Note that no write access is possible to variables assigned to an input.
Furthermore, AT declarations can be made for local and global variables only, not for the input and
output variables of organization units.
Examples:
bTrip_b AT %QX1.0.0: BOOL;
bRight_b AT %IX1.0.1: BOOL;
bReverse_b AT %MX2.2: BOOL;
Tip!
Boolean variables assigned to a byte, word or DWORD address subject a whole byte to TRUE or
FALSE. not just the first bit after the offset.
7.2.13
Syntax colouring
All editors provide visual assistance for implementation and variable declaration.
•
Coloured text helps to avoid errors or detect errors faster. (Unfinished comments will be
detected immediately, keywords will be written correctly, etc.)
The following colour code is applied:
Blue
Keywords
Green
Comments in text editors
Pink
Boolean values (TRUE, FALSE)
Red
Incorrect input (e. g. invalid time constant, keyword written in lower case ...)
Black
Variables, constants, assignment operators ...
Show/Hide Bookmarks