4 Understanding Programming
4-6
CP2E CPU Unit Software User’s Manual(W614)
4-2 Tasks, Sections, and Symbols
There are basically two types of tasks.
Task settings must be made to use interrupt tasks with a CP2E CPU Unit.
With the CX-Programmer, programs can be created and displayed in functional units called sections.
Any program in a task can be divided into sections.
Sections improve program legibility and simplifies editing.
I/O memory area addresses or constants can be specified by using character strings registered as symbols.
The symbols are registered in the symbol table of the CX-Programmer.
Programming with symbols enables programming with names without being aware of the addresses.
The symbol table is saved in the CX-Programmer project file (.CXP) along with other parameters, such
as the user programs.
There are two types of symbols that can be used in programs.
z Global Symbols
Global symbols can be accessed from all ladder programs in the PLC.
z Local Symbols
Local symbols can be accessed from only one task. They are assigned to individual tasks.
4-2-1 Overview of Tasks
Task type Description
Applicable
programming
language
Execution condition
Cyclic task Executed once per cycle Ladder diagram Only one for the CP2E.
(Normally, the user does not have to con-
sider this.)
Interrupt tasks Executed when a specific
condition occurs. The process
being executed is interrupted.
Ladder diagram An interrupt task is placed into READY
status when the interrupt condition
occurs. A condition can be set for the fol-
lowing interrupt tasks.
• Scheduled interrupt tasks
• I/O interrupt tasks
4-2-2 Overview of Sections
4-2-3 Overview of Symbols
Symbols
Symbol Types