Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 771

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
• 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.
• 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.
Note An error will occur if the upper limit is less than the lower limit for any one range.
Sample program
When CIO 0.00 turns ON in the following programming example, CTBL(882) registers a target value
comparison table and starts comparison for high-speed counter 0. The PV of the high-speed counter is
counted incrementally and when it reaches 500, it equals target value 1 and interrupt task 1 is
executed. When the PV is incremented to 1000, it equals target value 2 and interrupt task 2 is executed.
0.00
734
@CTBL
High-speed counter input 0
#0000
Register target comparison table
#0000
and start comparison
D100
Two target values
D100
0002
Target value 1: 0000 01F4 hex (500)
D101
01F4
Incrementing, Interrupt task number 1
Target value 2: 0000 03E8 hex (1000)
D102
0000
D103
0001
Incrementing, Interrupt task number 2
D104
03E8
D105
0000
D106
0002
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading

Table of Contents