Keywords

In all editors you must use capital letters for keywords identifying variable types, data types or operators.

A keyword may not be used as an identifier for a variable.

Examples

VAR
END_VAR
BOOL_TO_INT
IF
THEN
ELSE
LTIME
MUL
XOR
PERSISTENT
PROGRAM

CODESYS automatically checks the correct usage of keywords and indicates erroneous inputs by wavy underlining.

Note

If CODESYS creates implicit code, then variables and functions usually get names containing, mostly beginning with, a „__“. The usage of double underscores in implementation code is prevented automatically. So there won’t arise any conflicts between system-internal identifiers and those created by the user.

The following keywords are used in the CODESYS export format. For this reason they also may not be used as identifiers:

  • ACTION
  • END_ACTION
  • END_FUNCTION
  • END_FUNCTION_BLOCK
  • END_PROGRAM

The following are also keywords:

  • VAR_ACCESS
  • READ_ONLY
  • READ_WRITE
  • PARAMS