Omron SYSMAC CJ Series User Manual page 143

Sysmac cj series cpu unit pulse i/o module
Hide thumbs Also See for SYSMAC CJ Series:
Table of Contents

Advertisement

Example 2: Range Comparison
In this example, high-speed counter 1 operates in Ring Mode and starts interrupt task 12 when the PV
enters the range from 25,000 (0000 61A8 hex) to 25,500 (0000 639C hex).
The ring counter maximum value is set to 50,000 (0000 C350 hex).
1
Set high-speed counter 1 on the I/O Module Tab Page in the PLC Setup.
Counter setting
Counting Mode
Ring Counter Max. Value
Reset Method
Comparing After Counter
Reset
Pulse Input Mode
2
Set the range comparison table starting at word D2000. Even though range 1 is the only range
being used, all 40 words must still be dedicated to the range comparison table.
Word
D2000
D2001
D2002
D2003
D2004
D2005 to
D2008
D2009
D2014
D2019
D2024
D2029
D2034
D2039
3
Create the program for interrupt task 12.
4
Use the CTBL(882) instruction to start the comparison operation with high-speed counter 1 and
interrupt task 12.
CJ2M CPU Unit Pulse I/O Module User's Manual
Item
Input pulse frequency (100 kHz max.)
Ring mode
50,000
Software reset
Continue
Up/Down pulses
Setting
#61A8
Rightmost 4 digits of range 1 lower
limit
#0000
Leftmost 4 digits of range 1 lower limit
#639C
Rightmost 4 digits of range 1 upper
limit
#0000
Leftmost 4 digits of range 1 upper limit
#000C
Range 1, Interrupt task 12 (C hex), when entering range (leftmost bit
= ON)
All 0000
Range 2 lower and upper limit values
(Not used and do not need to be set.)
#FFFF
Disables range 2.
#FFFF
Set the 5th word for ranges 3 to 8 (listed at left) to FFFF hex (range
settings are invalid) to disable those ranges.
7 High-speed Counters
Setting
Description
Lower limit value: 25,000
Upper limit value: 25,500
Range 2 settings
7
7-33

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cj2m-cpu seriesSysmac cj2m-md21 series

Table of Contents