Global Symbols; Local Symbols - Omron CJ2 CPU - REV 10-2010 User Manual

Cj2 cpu unit software
Table of Contents

Advertisement

5 Understanding Programming
5-5-3

Global Symbols

Global symbols are symbols that are supported for all tasks in the target CPU Unit. For example, there-
fore, a symbol named "AAA" would be the same address in all tasks in the target CPU Unit.
Example: If the symbol named "AAA" is set as a global symbol, the same address will be assigned
(e.g., CIO 3.00) even if the task is different.
Global symbol
Global symbol
5-5-4

Local Symbols

Local symbols can be accessed only from the task they are in defined. Each local symbol is supported
in only one task. Local symbols are specified separately for each task, so identical symbols will be han-
dled as different symbols for different tasks.
For example, if the symbol named "AAA" is set as a local symbol, different addresses (e.g., CIO 0.00
and CIO 3.00) can be allocated for different tasks with the same "AAA" symbol.
Local symbol
for task A
Local symbol
for task B
5-50
PLC
Task A
AAA
The same address will be
assigned (e.g., CIO 3.00)
3.00
even if the task is different.
Task B
AAA
3.00
PLC
Task A
AAA
Different addresses
(e.g., CIO 0.00 and
0.00
CIO 3.00) can be
allocated.
Task B
AAA
3.00
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents