Omron CS1G/H-CPUxxH Instructions Manual page 801

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

High-speed Counter/Pulse Output Instructions
Note
780
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.
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.
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.
Range Comparison
The corresponding interrupt task is called and executed when the PV enters a
set range.
• The same interrupt task number can be specified for more than one target
value.
• The range comparison table contains 8 ranges, each of which is defined
by a lower limit and an upper limit. If a range is not to be used, set the
interrupt task number to FFFF hex to disable the range.
• The interrupt task is executed only once when the PV enters 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.
Section 3-21

Advertisement

Table of Contents
loading

Table of Contents