Omron CJ2 CPU UNIT SOFTWARE User Manual page 118

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

Advertisement

5 Understanding Programming
MSKR(692) Operand for Scheduled Interrupts
Operand
N (interrupt identifier)
I/O Interrupt Tasks
An I/O interrupt task will be executed when an input to an Interrupt Input Unit turns ON. The maximum
number of tasks that you can create is 32 (interrupt task numbers 100 to 131).
Executing Interrupt Tasks
To enable I/O interrupts, execute the MSKS(690) (SET INTERRUPT MASK) instruction.
Example: The following example shows execution I/O interrupt task 103 when interrupt input No. 3
of Interrupt Input Unit No. 0 (the leftmost of the two Units 0 and 1) is ON.
Cyclic task
Cyclic task
Interrupt Input Unit Numbers, Input Numbers, and I/O Interrupt Task Numbers
Interrupt Input Unit No.
0
1
*1 Interrupt Input Unit numbers are in order from 0 to 1 starting from the CPU Unit.
Interrupt Input Unit
CPU Unit
0
5-26
4: Read scheduled interrupt time (set value) for interrupt task 0 (interrupt task 2)
5: Read scheduled interrupt time (set value) for interrupt task 1 (interrupt task 3)
14: Read present value of internal timer for interrupt task 0 (CJ2M CPU Unit only,
interrupt task 2)
15: Read present value of internal timer for interrupt task 1 (CJ2M CPU Unit only,
interrupt task 3)
I/O interrupt from Interrupt Input Unit No. 0
Interrupt input number:
Only 3 will be enabled.
The specified I/O interrupt will be enabled
when the MSKS instruction is executed.
MSKS
0
#FFF7
END
Interrupt
I/O interrupt task 103
END
*1
Input No.
0 to 15
0 to 15
1
Unit No.
Set value
Interrupt Input Unit No. 0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
END
I/O interrupt task
100 to 115
116 to 131
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents