Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 753

Table of Contents

Advertisement

Flags
Name
Error Flag
Function
MSKR(692) reads the interrupt task settings that were set with MSKS(690). The value of N specifies
the interrupt task and the kind of information that will be read.
(1) Interrupt Mask Status for I/O Interrupts and Input Interrupts (N = 0 to 3, 6 to 9, or 100 to 107)
Reads the masked/unmasked status of the input interrupts specified by N, and outputs that
information to the bits in D.
(2) Specifying the Interrupt Input Differentiation for I/O Interrupts and Input Interrupts (N = 2, 3,
10 to 13, or 110 to 117)
Reads the up/down differentiation settings of the interrupt inputs specified by N, and outputs that
information to the bits in D.
(3) Setting Internal Timers for Scheduled Interrupts (N = 4 or 5)
Reads the time set for the internal timer of the scheduled interrupt specified by N, and outputs that
information to D.
(4) N = 14 or 15: Reading a Scheduled Interrupt's Internal Timer PV
Reads the internal timer PV of the scheduled interrupt specified by N, and outputs that information
to D. The internal timer's PV is the time that has elapsed since the scheduled interrupt started
(when MSKS(690) was executed), or the time that has elapsed since the last scheduled interrupt
started. (CJ1M and CJ2M CPU Units Only)
Note 1 The CJ1M-CPU11/21 supports only one scheduled interrupt task, interrupt task 2 for scheduled interrupt
0.
2 The time unit for the scheduled interrupt set time and PV is set as the Schedule Interrupt Interval in the
PLC Setup (default:10 ms).
3 MSKR(692) can be executed in the main program or in interrupt tasks.
Example Programming
Specifying I/O Interrupts for the CS1W-INT01 or CJ1W-INT01
When CIO 0.00 turns ON in the following example, MSKR(692) reads the current mask status of
Interrupt Input Unit 2 and stores it in D100.
0.00
MSKR
N
D
When CIO 0.01 turns ON in the following example, MSKS(690) reads the upward/downward
differentiation for Interrupt Input Unit 0 and stores it in D101.
0.01
MSKR
N
D
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Label
P_ER
• ON if N is not within the specified range (0 to 15 for the CJ1M CPU Unit, 0 to 15, 100 to 107, or 110 to
117 for the CJ2M CPU Unit; and 0 to 5 for other CPU Units).
• ON if an Interrupt Input Unit is not mounted when an I/O interrupt is specified for a CJ2M CPU Unit.
• OFF in all other cases.
15
14
1
1
D100
0
D100
0: Interrupt enabled
1: Interrupt masked
15
14
D101
0
0
2
D101
0: Upward differentiation
1: Downward differentiation
Operation
13
12
11
10
9
8
7
6
1
1
0
1
0
1
1
1
F
5
13
12
11
10
9
8
7
6
0
0
0
0
1
1
0
0
0
3
3. Instructions
5
4
3
2
1
0
1
1
0
0
1
0
F
2
5
4
3
2
1
0
0
1
1
0
0
1
1
9
3
717

Advertisement

Table of Contents
loading

Table of Contents