Operands¶
Constants
You declare constants with the keyword CONSTANT. Constants can be either local or global.
Syntax:
VAR CONSTANT <identifier>:<Type> := <initialization>; END_VAR
- BOOL Constants
- TIME Constants
- DATE Constants
- DATE_AND_TIME Constants
- TIME_OF_DAY Constants
- Numeric Constants
- REAL/LREAL Constants
- String Constants
- Typed Literals
See also
Variables
You declare variables as local or global in the declaration section of a POU or in a global variable list.
The position where you can use a variable depends on its data type.
See also
- Access to Variables in Arrays, Structures, and Blocks
- Bit Access to Variables
- Using Input Assistance
- Programming of Applications
Other