4 general language elements, 1 identifiers, 2 keywords – Lenze DDS v2.0 User Manual
Page 11: 3 comments, 4 literals, 4general language elements

Introduction to IEC 61131-3 programming
General language elements
9
l
DDS-IEC61131 EN 2.0
4
General language elements
General language elements of IEC 61131-3 are identifiers, keywords, comments, literals, data types
and variables. They are described in detail in the following sub-sections:
4.1
Identifiers
Identifiers are used to address variables, functions, programs, etc. They are elements and can
support the readability of programs.
•
Identifiers are a sequence of letters, digits and underscores starting with a letter or an
underscore.
Identifiers must not
•
include spaces and umlaute.
•
be declared twice in the same way.
•
be identical with keywords.
(
^Chapter 4.2)
Tip!
The conventions used for the variable identifiers of Lenze system blocks, function blocks and
functions are described in the appendix.
4.2
Keywords
Keywords are unambiguous character combinations which are used as individual syntax elements.
•
Keywords must not be used as identifiers.
Examples of keywords to IEC 61131-3
ABS
, SIN, BOOL, FALSE, TRUE, FOR, NEXT, IF, THEN, VAR, GLOBAL, DATE, TIME, FUNCTION
4.3
Comments
Comments or program parts help to understand the program and are important communication
means. Comments are allowed in all text editors at any place and must start and end with a special
character sequence (* and *). Every network can be commmented to document its functionality.
4.4
Literals
IEC 61131-3 describes literals as a sequence of characters, digits or times.
Character sequences
Character sequence literals have 0 or more characters and start and end with inverted commas (e.g.
’Character sequence’
).
Digits
There are two different numerical literals: integers and reals.
Show/Hide Bookmarks