
3-35
3 Operation and Configuration
CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
3-5 Outp
ut Con
tr
o
l
3
3-5-2 C
o
mpar
ison Mode
z
Reflecting Active/Not Active Comparison Values
A comparison condition is met when the Counter Value is equal to or larger than the comparison
value. The comparison value active/inactive established status is reflected in the following device
variable for CJ-series Unit (for input) for each Counter.
Additional Information
The Ranges/Comparison Active bit indicates whether the current Counter Value is larger than
the CV or not. Therefore, if a Counter Value is preset larger than a CV, the bit changes to ON
without crossing the CV. If the Counter Value crosses the CV in the reverse (CCW) direction, the
bit does not change to ON.
z
Enable/Disable Comparison Values
Every single comparison condition can be enabled or disabled. If comparison conditions are dis-
abled (by default), no action will be taken even if the Counter Value reaches the CV. If comparison
conditions are enabled, depending on the counting direction, the set or reset pattern is applied to the
unit output pattern when the CV is reached. To enable or disable Counter comparison conditions,
refer to the following device variables for CJ-series Unit (for setting):
Name of device variable
for CJ-series Unit
Type
Name
Function
*_Ch1_RngCmpDatSta
DWORD
Ranges / Comparison
Values active
The current status of the comparison condi-
tions is shown.
Bits 00 to 31 correspond to comparison con-
ditions 0 to 31.
Each bit shows 1 when the conditions are
met and 0 when they are not.
*_Ch2_RngCmpDatSta
*_Ch1_RngCmpSta0 to
*_Ch1_RngCmpSta31
BOOL
Ranges 0 to 31 / Com-
parison Values 0 to 31
active
The numbers after "Sta" correspond to com-
parison conditions 0 to 31.
0: Range conditions not met
1: Range conditions met
*_Ch2_RngCmpSta0 to
*_Ch2_RngCmpSta31
Name of device variable
for CJ-series Unit
Type
Name
Function
*_Ch1_RngCmpEnblCfg
DWORD
Range/Comparison
Enable Data
Sets whether the range and comparison
data is enabled or disabled.
Bits 00 to 31 correspond to comparison data
0 to 31.
0: Comparison data disabled
1: Comparison data enabled
*_Ch2_RngCmpEnblCfg