Omron CJ2 CPU UNIT SOFTWARE User Manual page 119

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

MSKS(690)
To enable I/O interrupt tasks, execute an MSKS(690) (SET INTERRUPT MASK) instruction in the
program of a cyclic task, and enable the interrupt for the specified interrupt number of the specified
Interrupt Unit.
Operand S (the Second Operand) of MSKS(690):
The bits of FFF7 hex correspond to the interrupt inputs of the Interrupt Input Unit. Interrupt input
numbers 0 to 15 correspond to bits 0 to 15.
Example:
15
14
13
12
1
1
1
1
F hex
Precautions for Correct Use
Precautions for Correct Use
Do not enable unneeded I/O interrupt tasks. If the interrupt input is triggered by noise and there
is not a corresponding interrupt task, a fatal error (task error) will cause the program to stop.
Interrupt Overhead Time for I/O Interrupt Tasks
The time from when the input bit of the Interrupt Input Unit (CJ1W-INT01) turns ON (or OFF) until
the CPU Unit receives the interrupt signal depends on the hardware response time. The time from
when the interrupt signal is received until the I/O interrupt task is actually executed is called the
interrupt task startup time in I/O interrupt tasks. The time it takes to return to the processing before
interruption after the interrupt task program has been executed is called the cyclic task return time.
The combination of the interrupt task startup time and the cyclic task return time is called the inter-
rupt overhead time.
Using an Interrupt Input Unit
Hardware response (CJ1W-INT01)
Interrupt over-
head time
*1 Using High-speed interrupt function
Refer to 10-2-6 High-speed Interrupt Function for information on High-speed interrupt function.
Note I/O interrupt tasks can be executed during user program execution, I/O refreshing, peripheral servicing, or
overhead processing. (An I/O interrupt task can also be executed even if an instruction is being executed.
The instruction will be interrupted.) An input interrupt will not be processed immediately if it occurs during
execution of an interrupt task. The current interrupt task will be executed to the end first, and then execution
of the new interrupt will be started after the cyclic task return time and interrupt task startup time have
expired.
CJ2 CPU Unit Software User's Manual
11
10
9
8
7
6
5
4
1
1
1
1
1
1
1
1
F hex
F hex
Item
Interrupt task startup time
Cyclic task return time
5 Understanding Programming
3
2
1
0
0
1
1
1
7 hex
Example when the interrupt condition
is the third bit.
CJ2H CPU Units
Upward differentiation: 0.05 ms, Downward differentiation: 0.5
ms
26 µs or 17 µs
*1
(30 µs for unit version 1.0)
11 µs or 8 µs
*1
(15 µs for unit version 1.0)
Time
CJ2M CPU Units
31 µs
10 µs
5
5-27

Advertisement

Table of Contents
loading

Table of Contents