Introduction
When Program Units are allowed in programming your application (Modicon M580 and M340), variables are determined by the scope to which they belong to:
Global variables: | They refer to the application wide - or global - scope of data in a project which are:
|
Program Unit variables: | They refer to the Program Unit data scope and have one of the following attributes:
|
NOTE: The management of topological variable is only
supported in the data editor, refer to parameter assignment to map a
variable of a Program Unit to a topological variable.
Data Scope in Project Browser

1 Global variables, managed via the Data Editor
2 Variables under Program0
scope, managed via the Program Unit Data Editor of the Program0.
3 Variables under Program1
scope, managed via the Program Unit Data Editor of the Program1.
Variables Accessibility
The variable accessibility is dependent to the scope (Global, Program Unit):

NOTE: System behavior of the PLC is accessible using
the system bits and system words into the Program Unit.