PLC

Operands

 

Constants

The keyword CONSTANT is used to identify constants. You can declare constants locally or globally.

Syntax:

VAR CONSTANT 
    <Identifier>:<Type> := <Initialization>;
END_VAR 

See also:

 
 

Variables

You can declare variables either locally in the declaration part of a function block, or in a global variable list.

At which point you can use a variable depends on its data type.

See also:

 
 

Further

 
Additional information
BOOL Constants
TIME Constants
DATE Constants
DATE_AND_TIME Constants
TIME_OF_DAY Constants
Numeric Constants
REAL/LREAL Constants
STRING Constants
Typed Literals
Access to Variables in Arrays, Structures, and Blocks
Bit Access to Variables
Addresses
Functions