22  LABELS
22.3  Classes
373
22
22.3 Classes
The label class indicates from which POU and how a label can be used.
Different classes can be selected depending on the type of POU.
Global label
Class Description Applicable POU
Program 
block
Function block Function
VAR_GLOBAL A common label that can be used in both program blocks and 
function blocks
 
VAR_GLOBAL_CONSTANT A common constant that can be used in both program blocks 
and function blocks
 
VAR_GLOBAL_RETAIN A latch type label that can be used in both program blocks and 
function blocks
 
Local label
Class Description Applicable POU
Program 
block
Function block Function
VAR A label that can be used within the range of a declared POU.
This label cannot be used in other POUs.
 
VAR_CONSTANT A constant that can be used within the range of a declared 
POU.
This label cannot be used in other POUs.
 
VAR_RETAIN A latch type label that can be used within the range of a 
declared POU. This label cannot be used in other POUs.
 
VAR_INPUT A label that inputs a value into a function or function block.
This label receives a value, and the received value cannot be 
changed in a POU.
 
VAR_OUTPUT A label that outputs a value from a function or function block  
VAR_OUTPUT_RETAIN A latch type label that outputs a value from a function block  
VAR_IN_OUT A local label that receives a value and outputs the value from a 
POU. The value can be changed in a POU.
 
VAR_PUBLIC A label that can be accessed as the public variable from other 
POUs
 
VAR_PUBLIC_RETAIN A latch type label that can be accessed as the public variable 
from other POUs