Reserved keywords in ST
Do not use keywords for identifiers
If you enter →identifiers within the ST-code, the FBD-logic or ladder diagram (e.g. for names of variables), do not use any of the →keywords for them because keywords have been reserved according to →IEC-standard. If you do anyway, the identifiers are highlighted as errors.
Note that some of the following keywords can be used in ST/FBD/LD. This can be done because these keywords have been reserved for a different object type (e.g. for a
PLC-object
).
logi.cals
recommends to carefully use such keywords within ST/FBD/LD.
Example: If you use such a keyword
(e.g. INTERVAL) as identifier for a →program or an →external variable within ST/FBD/LD, this usage within the ST-/FBD-/LD-object is not highlighted as an error. But if you enter/use the language element within the PLC-object (as program type for the program →instance or as →global variable), the identifier used within the PLC-object will be highlighted as an error. See also "Ein Bezeichner wird für ST/FBS akzeptiert, aber nicht im SPS-Objekt. Das Refactoring des Bezeichners funktioniert nicht wie erwartet".
At present, the following keywords are reserved within logi.CAD 3 and must not be used for identifiers.
(The following list is not final. It will grow to the same extent as a new version is providing new features.)
Keyword |
Meaning |
Reserved for (1) |
ABSTRACT |
part of a →method or a →function block |
all |
ACTION |
together with END_ACTION: action in ST |
all |
AND |
all |
|
ANY and other ANY_* |
all |
|
ARRAY |
together with OF: declaration of an →array data type or →variable |
all |
AT |
assign a physical address (e.g. to a →global variable) |
all |
BOOL |
→data type BOOL |
all |
BY |
part of FOR statement |
all |
BYTE |
data type BYTE |
all |
CASE |
part of CASE statement |
all |
CHAR |
data type CHAR |
all |
CLASS |
reserved for the future |
all |
CFG_VARCFG |
together with END_CFG_VARCFG: declaration of a VAR_CONFIG section |
PLC,
|
CONFIGURATION |
together with END_CONFIGURATION: →configuration according to IEC-standard |
PLC |
CONSTANT |
→constant (The declared element cannot be modified.) |
all |
CONTINUE |
all |
|
DATE |
data type DATE |
all |
DATE_AND_TIME |
long form for data type DATE_AND_TIME |
all |
DINT |
data type DINT |
all |
DO |
part of FOR statement or WHILE statement |
all |
DT |
short form for data type DATE_AND_TIME |
all |
DWORD |
data type DWORD |
all |
ELSE |
part of IF statement or CASE statement |
all |
ELSIF |
part of IF statement |
all |
EN |
input EN for execution control EN and ENO are not keywords according to IEC-standard as such but variables that are already declared implicitly within →functions and →function blocks. |
all |
END_ACTION |
together with ACTION: action in ST |
all |
END_CASE |
part of CASE statement |
all |
END_CFG_VARCFG |
together with CFG_VARCFG: declaration of a VAR_CONFIG section |
PLC, |
END_CLASS |
reserved for the future |
all |
END_CONFIGURATION |
together with CONFIGURATION: configuration according to IEC-standard |
PLC |
END_FOR |
part of FOR statement |
all |
END_FUNCTION |
together with FUNCTION: declaration of a function |
all |
END_FUNCTION_BLOCK |
together with FUNCTION_BLOCK: declaration of a function block |
all |
END_GLOBALS |
together with GLOBALS: declaration of global variables in a global-object (see "Declaration of global variables in global-object and its usage in ST") |
PLC |
END_IF |
part of IF statement |
all |
END_INTERFACE |
together with INTERFACE: declaration of an →interface |
all |
END_METHOD |
together with METHOD: declaration of a method or →method prototype |
all |
END_NAMESPACE |
together with NAMESPACE: declaration of a →namespace |
all |
END_PROGRAM |
together with PROGRAM: declaration of a →program |
all |
END_REPEAT |
part of REPEAT-statement |
all |
END_RES_VARCFG |
together with RES_VARCFG: declaration of a VAR_CONFIG section |
PLC,
|
END_RESOURCE |
together with RESOURCE and ON: →resource according to IEC-standard |
PLC |
END_STEP |
together with INITIAL_STEP or STEP: initial step in ST or step in ST |
all |
END_STRUCT |
together with STRUCT: declaration of a →structured data type |
all |
END_TRANSITION |
together with TRANSITION: transition in ST |
all |
END_TYPE |
together with TYPE: declaration of a →user-defined data type |
all |
END_VAR |
together with VAR, VAR_CONFIG, VAR_EXTERNAL, VAR_GLOBAL, VAR_INPUT, VAR_IN_OUT, VAR_OUTPUT or VAR_TEMP: declaration of one or more variables |
all |
END_WHILE |
part of WHILE statement |
all |
ENO |
input ENO for execution control EN and ENO are not keywords according to IEC-standard as such but variables that are already declared implicitly within functions and function blocks. |
all |
EXIT |
all |
|
EXTENDS |
derives the interface from other interfaces and the function block from another one respectively |
all |
F_EDGE |
reserved for the future |
all |
FALSE |
naming a Boolean →literal |
all |
FINAL |
part of a method or a function block |
all |
FOR |
part of FOR statement |
all |
FROM |
part of a transition in ST |
all |
FUNCTION |
together with END_FUNCTION: declaration of a function |
all |
FUNCTION_BLOCK |
together with END_FUNCTION_BLOCK: declaration of a function block |
all |
GLOBALS |
together with END_GLOBALS: declaration of global variables in a global-object |
PLC |
IF |
part of IF statement |
all |
IMPLEMENTS |
implements one or more i nterfaces with the d eclaration of a f unction block |
all |
INITIAL_STEP |
together with END_STEP: initial step in ST |
all |
INT |
data type INT |
all |
INTERFACE |
together with END_INTERFACE: declaration of an interface |
all |
INTERNAL |
visibility of a method or of internal variables |
all |
INTERVAL |
cycle time for the →task |
PLC |
LDATE |
reserved for the future |
all |
LDATE_AND_TIME |
reserved for the future |
all |
LINT |
data type LINT |
all |
LREAL |
data type LREAL |
all |
LTIME |
reserved for the future |
all |
LTIME_OF_DAY |
reserved for the future |
all |
LWORD |
data type LWORD |
all |
METHOD |
together with END_METHOD: declaration of a method or method prototype |
all |
MOD |
operator |
all |
NAMESPACE |
together with END_NAMESPACE: declaration of a namespace |
all |
NON_RETAIN |
→non-retentive variable |
all |
NOT |
operator |
all |
NULL |
default →initial value for a →reference variable |
all |
OF |
part of CASE statement or together with ARRAY: declaration of an array data type or variable |
all |
ON |
together with RESOURCE and END_RESOURCE: resource according to IEC-standard |
PLC |
OR |
operator |
all |
OVERLAP |
reserved for the future |
all |
OVERRIDE |
part of a method |
all |
PRIORITY |
priority of the task (for PLC-object) or priority of a transition (in ST) |
all |
PRIVATE |
visibility of a method or of internal variables |
all |
PROGRAM |
together with END_PROGRAM: declaration of a program |
all |
PROTECTED |
visibility of a method or of internal variables |
all |
PUBLIC |
visibility of a method or of internal variables |
all |
R_EDGE |
reserved for the future |
all |
READ_ONLY |
reserved for the future |
all |
READ_WRITE |
reserved for the future |
all |
REAL |
data type REAL |
all |
REF |
operator for initializing a reference variable or for an assignment to it |
all |
REF_TO |
declaration of one or more reference variables |
all |
REPEAT |
part of REPEAT-statement |
all |
RES_VARCFG |
together with END_RES_VARCFG: declaration of a VAR_CONFIG section |
PLC,
|
RESOURCE |
together with ON and END_RESOURCE: resource according to IEC-standard |
PLC |
RETAIN |
→retentive variable |
all |
RETURN |
all |
|
SINGLE |
reserved for the future |
PLC |
SINT |
data type SINT |
all |
STEP |
together with END_STEP: step in ST |
all |
STRING |
data type STRING |
all |
STRUCT |
together with END_STRUCT: declaration of a structured data type |
all |
SUPER |
part of the call of a method of the base function block or call of the base function itself |
all |
TASK |
task according to IEC-standard |
PLC |
THEN |
part of IF statement |
all |
THIS |
part of the call of a method of the same function block |
all |
TIME |
data type TIME |
all |
TIME_OF_DAY |
long form for data type TIME_OF_DAY |
all |
TO |
part of FOR statement or part of a transition in ST |
all |
TOD |
short form for data type TIME_OF_DAY |
all |
TRANSITION |
together with END_TRANSITION: transition in ST |
all |
TRUE |
naming a Boolean literal |
all |
TYPE |
together with END_TYPE: declaration of a user-defined data type |
all |
UDINT |
data type UDINT |
all |
UINT |
data type UINT |
all |
ULINT |
data type ULINT |
all |
UNTIL |
part of REPEAT-statement |
all |
USING |
USING namespace directive |
all |
USINT |
data type USINT |
all |
VAR |
together with END_VAR: declaration of one or more internal variables |
all |
VAR_ACCESS |
reserved for the future |
all |
VAR_CONFIG |
together with END_VAR: declaration of a VAR_CONFIG section |
PLC,
|
VAR_EXTERNAL |
together with END_VAR: declaration of one or more →external variables |
all |
VAR_GLOBAL |
together with END_VAR: declaration of one or more global variables |
all |
VAR_IN_OUT |
together with END_VAR: declaration of one or more →in-out variables |
all |
VAR_INPUT |
together with END_VAR: declaration of one or more →input variables |
all |
VAR_OUTPUT |
together with END_VAR: declaration of one or more →output variables |
all |
VAR_TEMP |
together with END_VAR: declaration of one or more →temporary variables |
all |
WCHAR |
reserved for the future |
all |
WHILE |
part of WHILE statement |
all |
WITH |
together with PROGRAM: assigning "program and task" |
PLC |
WORD |
data type WORD |
all |
WSTRING |
reserved for the future |
all |
XOR |
operator |
all |
Legend:
(1) = This column informs for which object type the keyword has been reserved:
all = If you enter the keyword within an ST-object, an FBD-object, an LD-object, a global-object, a PLC-object or a VarCfg-object, it will be highlighted as an error.
PLC = If you enter the keyword within a PLC-object, it will be highlighted as an error. Meaning: It is possible to use the keyword as an identifier within other object types (e.g. within an ST-/FBD-object). But mind that errors might occur when you are using the appropriate language element in a PLC-object.
VarCfg = Falls If you enter the keyword within VarCfg-object (see "Declaring VAR_CONFIG section within a VarCfg-object"),it will be highlighted as an error. Meaning: It is possible to use the keyword as an identifier within other object types (e.g. within an ST-/FBD-object). But mind that errors might occur when you are using the appropriate language element in an VarCfg-object.