→External variable

External →variables within the declaration of a →function block or a →function are needed to access →global variables which were declared within a →program. External variables within the declaration of a program are needed to access global variables which were declared within a →resource (in a PLC-object).
The →data type of an external variable muss match the data type of the global variable.

The ST-syntax for external variables is listed under "Declaration of external variables in ST".
Information on the declaration of variables in →FBD is listed under "Declaring variables in FBD". Information on the declaration of variables in →LD is listed under "Declaring variables in LD and assigning a variable to contact/coil ".

The application navigator provides the possibility to declare external variables and to have the declarations based on the already existing global variables. This is done when you drag the global variables from a global-object onto a →POU. Details: See "Declaring external variables by dragging and dropping global variables into POUs".