
3-13
3 Operation and Configuration
CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
3-2 Co
unter T
yp
es
3
3-2-3 L
inear Counter
z
Configuring Upper and Lower Count Limits
The Upper Count Limit must be positive and the Lower Count Limit must be negative. (If either is set
to 0, the upper count limit becomes 2,147,483,647 and the lower count limit becomes
−
2,147,483,648.) To set the Upper and Lower Count Limits, refer to the following.
z
Creating Error Codes
To create an error code with a Linear Counter, set the bits 4 to 7 of the device variable for CJ-series
Unit (for setting) to 1.
z
Overflow and Underflow Flags
An Overflow or Underflow of a Linear Counter is reported in the device variables for CJ-series Unit
(for input).
Name of device variable
for CJ-series Unit
Type
Name
Function
*_Ch1_UpCtLmtCfg
UDINT
Upper Count Limit
Circular/Linear
Set a value in the range of 0 to
2,147,483,647.
When 0 is set, this becomes 2,147,483,647.
*_Ch2_UpCtLmtCfg
*_Ch1_LowCtLmtCfg
DINT
Lower Count Limit
Linear
Set a value in the range of
−
2,147,483,648 to 0.
When 0 is set, this becomes
−
2,147,483,648.
*_Ch2_LowCtLmtCfg
Name of device variable
for CJ-series Unit
Type
Name
Function
*_Ch1_ZOvfUdfCfg
WORD
Z-reset Mode / Over-
flow/Underflow error-
code generation
Bits 00 to 03: Z phase reset
16#0: No function
16#1: Reset
Bits 04 to 07: Overflow/underflow error set-
ting
16#0: Do not generate error codes.
16#1: Generate error codes.
Bits 8 to 15: 00
*_Ch2_ZOvfUdfCfg
Name of device variable
for CJ-series Unit
Type
Name
Function
*_Ch1_CtOvf
BOOL
Counter Overflow
1: Overflow
0: Other than the above
*_Ch2_CtOvf
*_Ch1_CtUdf
BOOL
Counter Underflow
1: Underflow
0: Other than the above
*_Ch2_CtUdf