EasyManuals Logo
Home>Omron>Controller>CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS User Manual

Omron CJ - INSTRUCTIONS
1308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #786 background imageLoading...
Page #786 background image
3. Instructions
748
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
CTBL(882) registers a comparison table and starts target-value or range comparison for the high-speed
counter specified in P and the method specified in C.
z Registering a Comparison Table (C = 0002, 0003, 0005 Hex)
If C is set to 0002 or 0003 hex, a comparison table will be registered, but comparison will not be started.
Comparison is started with INI(880).
z Registering a Comparison Table and Starting Comparison (C = 0000, 0001, 0004
Hex)
If C is set to 0000 or 0001 hex, a comparison table will be registered, and comparison will be started.
• 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. It is thus
normally sufficient to use the differentiated version (@SPED(885)) of the instruction or an execution
condition that is turned ON only for one scan.
• Comparison is stopped with INI(880). It makes no difference what instruction was used to start
comparison.
z 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 compared to the target value only when the PV is being incremented.
If bit 00 is ON, the PV will be compared to the target value 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 direction is registered more than
once in the same table.
2 If the high-speed counter is set for incremental pulse mode, an error will occur if decrementing is set in the
table as the direction for comparison.
3 If the count direction changes while the PV equals a target value that was reached in the direction opposite
to that set as the comparison direction, the comparison condition for that target value will not be met. Do
not set target values at peak and bottom values of the count value.
z Range Comparison
The PV of the high-speed counter is compared to the specified ranges and the result is output to flags.
Also, a specified interrupt can be executed when the PV is outside a range (CJ2M only) or in a range.
• The range comparison table contains 1 to 32 ranges (CJ2M only) or 8 ranges. Overlapping ranges
can be specified. An interrupt task number is set for each range.
• The same interrupt task number can be specified for more than one target value.
• The interrupt task is executed either when the PV enters the range or leaves the range. (This is
specified with the MSB when specifying the interrupt task number. The interrupt task is executed only
once when the PV enters or leaves the range.
If the PV is within more than one range when the comparison is made, the interrupt task for the range
closest to the beginning of the table will be given priority and other interrupt tasks will be executed in
following cycles.
Note An error will occur if the upper limit is less than the lower limit for any one range.
• If there is no reason to execute an interrupt task, specify AAAA hex as the interrupt task number. The
range comparison results can be read with PRV(881) or using the Range Comparison In-progress
Flags in the Auxiliary Area.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ - INSTRUCTIONS and is the answer not in the manual?

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals