![background image](http://html.mh-extra.com/html/omron/sysmac-cp-series/sysmac-cp-series_user-manual_742262169.webp)
10-13
10 Interrupts
CP2E CPU Unit Software User’s Manual(W614)
10-4
P
reca
utio
ns f
o
r U
s
ing
Int
e
rr
u
p
ts
10
10-4-1 Interr
upt T
a
sk Pr
ior
ity and
Ord
er of Ex
ecution
10-4 Precautions for Using Interrupts
The priority of interrupt tasks is the same order for input interrupts, scheduled interrupts and high-speed
counter interrupts. Therefore, if interrupt task A (an input interrupt, for example) is being executed when
interrupt task B (a scheduled interrupt, for example) occurs, task A execution will not be interrupted.
Task B execution will be started when task A had been completed.
For example, if an interrupt task is being executed for another interrupt (input interrupt or high-speed
counter interrupt) when a scheduled interrupt occurs, the scheduled interrupt will not be executed until
execution of the other interrupt task had been completed. Even in this case, internal timer is continually
measured in parallel, so the execution of the scheduled interrupt task will not be delayed.
When the processing time of an interrupt task exceeds 0.1ms, the processing time of the interrupt task
and the task number of the interrupt with the maximum processing time can be found in the Auxiliary
Area. The actual processing time can also be checked.
Observe the following precautions, if a word address in I/O memory is manipulated by instructions both
in a cyclic task and an interrupt task.
•
If the interrupt task overwrites an I/O memory address used by one of the interrupted instruction
’
s
operands, the data may be overwritten when the saved data is restored when processing returns to
the cyclic task.
•
To prevent certain instructions from being interrupted during processing, insert the DI or EI instruction
just before and after the instructions, using the DI or EI instruction before the instructions to disable
interrupts and the DI or EI instruction after the instructions to enable interrupts again.
Additional Information
Normally, if an interrupt occurs, execution of the cyclic task will be interrupted immediately, even
during execution of an instruction in the cyclic task, and the partially processed data is saved.
After the interrupt task had been completed, the cyclic task restarts with the data saved before
the interrupt processing.
10-4-1 Interrupt Task Priority and Order of Execution
10-4-2 Related Auxiliary Area Words and Bits
Name
Addresses
Description
Maximum
Interrupt Task
Processing Time
A440
Contains the maximum interrupt task processing time in units of 0.1 ms.
This value is cleared at the start of operation.
Interrupt Task
With Maximum
Processing Time
A441
Contains the task number of the interrupt task with the maximum processing
time. Here, #
8
000 to #
8
00F correspond to tasks 0 to 15 (00 to 0F hex).
A441.15 will turn ON when the first interrupt occurs after the start of operation.
The maximum processing time for subsequent interrupt tasks will be stored in
the rightmost digit in hexadecimal. This value is cleared at the start of opera-
tion.
Total of Interrupt
Task Processing
Time in One
Cycle
A442
Contains the total of interrupt task processing time in one cycle in units of
0.1ms. Sets when the value is bigger than the last one once a cycle by com-
mon processing.This value is cleared at the start of operation.
10-4-3 Duplicate Processing in each Task
Содержание SYSMAC CP Series
Страница 1: ...USER S MANUAL Cat No W614 E1 01 SYSMAC CP Series CP2E E D CP2E S D CP2E N D CP2E CPU Unit Software ...
Страница 3: ......
Страница 32: ...1 Overview 1 4 CP2E CPU Unit Software User s Manual W614 ...
Страница 44: ...3 CPU Unit Operation 3 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 116: ...6 I O Allocation 6 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 144: ...7 PLC Setup 7 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 170: ...10 Interrupts 10 14 CP2E CPU Unit Software User s Manual W614 ...
Страница 200: ...11 High speed Counters 11 30 CP2E CPU Unit Software User s Manual W614 ...
Страница 272: ...12 Pulse Outputs 12 72 CP2E CPU Unit Software User s Manual W614 ...
Страница 278: ...13 PWM Outputs 13 6 CP2E CPU Unit Software User s Manual W614 ...
Страница 460: ...18 Programming Device Operations 18 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 576: ...Revision 2 CP2E CPU Unit Software User s Manual W614 ...
Страница 577: ......