Cx-Programmer Operations For Tasks - Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

CX-Programmer Operations for Tasks

Data Concurrency
between Cyclic and
Interrupt Tasks
2-4
CX-Programmer Operations for Tasks
Note
CX-Programmer
1,2,3...
Data may not be concurrent if a cyclic (including extra cyclic tasks) and an
interrupt task are reading and writing the same I/O memory addresses. Use
the following procedure to disable interrupts during memory access by cyclic
task instructions.
• Immediately prior to reading or writing by a cyclic task instruction, use a
DISABLE INTERRUPT (DI(693)) instruction to disable execution of inter-
rupt tasks.
• Use an ENABLE INTERRUPT instruction (EI(694)) immediately after pro-
cessing in order to enable interrupt task execution.
Cyclic task
Reading and writing I/O
memory common to
interrupt tasks.
Processing with interrupt task
execution enabled
Problems may occur with data concurrency even if DI(693) and EI(694) are
used to disable interrupt tasks during execution of an instruction that requires
response reception and processing (such as a network instruction or serial
communications instruction).
Use the CX-Programmer to create cyclic tasks (including extra cyclic tasks).
Be sure to use the CX-Programmer to allocate the task types and task num-
bers.
Specify the task type and number as attributes for each program.
1. Select View/Properties, or click the right button and select Properties
from the popup menu, to display the program that will be allocated a task.
2. Click the General Tab, and select the Task Type and Task No. For a cyclic
task, select the Operation start Option to start the task at startup if re-
quired.
Section 2-4
Disabled
Interrupt task
Enabled
Interrupt task
75

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents