
3 Operation and Configuration
3-12
CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
Additional Information
A Linear Counter can uses all functions listed in 1-3-2 Functional Specifications.
z
Configuring Linear Counters
Linear Counters are set with the following device variables for CJ-series Unit (for setting).
A Linear Counter has the full counting range (=32 bits) available to count up and down within the
range between the Lower Count Limit and the Upper Count Limit. By default the Lower and Upper
Count Limits are set to the maximum and minimum counting limits (i.e. –2,147,483,648 and
2,147,483,647 respectively).
If a Counter Value exceeds the Upper Count Limit, an overflow is set in the device variable for CJ-
series Units; if a Counter Value is below the Lower Count Limit, an underflow is set.
You can make settings to issue corresponding error codes when an overflow or underflow occurs. If
a Z-reset Mode/Overflow/Underflow error-code generation (Bits 04 to 07) is set, the overflow/under-
flow error can be stored in the Unit EEPROM (refer to 5-2-2 Overflow/Underflow errors).
Another feature of overflow/underflow error code is that output states at errors can be predefined.
For this purpose you should use the Output State Control function (refer to 3-5-4 Output Control
Configuration for more information).
3-2-3
Linear Counter
Name of device variable
for CJ-series Unit
Type
Name
Function
*_Ch1_CtTypCfg
UINT
Counter Type
0: Circular Counter
1: Linear Counter
*_Ch2_CtTypCfg
Counter V alue
0
Count up
Count down
Underflow
Overflow
−
2,147,483,648
≤
Lowercount Limit
≤ −
1
≤
≤
1 Uppercount Limit 2,147,483,647