Dr0 To Dr15, Ir0 To Ir15; Ir0 To ,Ir15; To +2047, Ir0 To -2048 To +2047, Ir15 - Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

High-speed Counter/Pulse Output Instructions
Description
Area
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
CTBL(882) registers a comparison table or registers and comparison table
and starts comparison for the port specified in P and the method specified in
C. Once a comparison table is registered, it is valid until a different table is
registered or until the CPU Unit is switched to PROGRAM mode.
Each time CTBL(882) is executed, comparison is started under the specified
conditions. When using CTBL(882) to start comparison, it is normally suffi-
cient to use the differentiated version (@CTBL(882)) of the instruction or an
execution condition that is turned ON only for one scan.
Note
If an interrupt task that has not been registered is specified, a fatal program
error will occur the first time an interrupt is generated.
Registering a Comparison Table (C = 0002 or 0003 hex)
If C is set to 0002 or 0003 hex, a comparison table will be registered, but com-
parison will not be started. Comparison is started with INI(880).
Registering a Comparison Table and Starting Comparison (C = 0000 or
0001 hex)
If C is set to 0000 or 0001 hex, a comparison table will be registered, and
comparison will be started.
Stopping Comparison
Comparison is stopped with INI(880). It makes no difference what instruction
was used to start comparison.
Target Value Comparison
The corresponding interrupt task is called and executed when the PV
matches a target value.
• The same interrupt task number can be specified for more than one target
value.
• The direction can be set to specify whether the target value is valid when
the PV is being incremented or decremented. If bit 15 in the word used to
specify the interrupt task number for the range is OFF, the PV will be com-
pared to the target value only when the PV is being incremented, and if bit
00 is ON, only when the PV is being decremented.
• The comparison table can contain up to 48 target values, and the number
of target values is specified in TB (i.e., the length of the table depends on
the number of target values that is specified).
• Comparisons are performed for all target values registered in the table.
Note
(1) An error will occur if the same target value with the same comparison di-
rection is registered more than once in the same table.
P
C
See descrip-
See descrip-
tion of oper-
tion of oper-
and.
and.
---
---
---
---
---
---
Section 3-20
TB
---
---
---

,IR0 to ,IR15

–2048 to +2047 ,IR0 to
–2048 to +2047 ,IR15
DR0 to DR15, IR0 to
IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
721

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents