
3 Operation and Configuration
3-6
CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
3-2
Counter Types
Every single Counter of the High-speed Counter Unit can be set independently to one of the following
Counter Types (for an overview of the differences between Simple and Circular/Linear Counters refer
to 1-4 Quick Start Up Reference Guide):
• Simple Counter (refer to 3-2-1 Simple Counter)
• Circular Counter (refer to 3-2-2 Circular Counter)
• Linear Counter (refer to 3-2-3 Linear Counter)
The configuration starts by setting each Counter's DIP switch on the front of the Unit.
The factory setting is all DIP switches are set to OFF (for Simple Counters). When you use a Counter
as a Circular Counter or Linear Counter, set them to ON, and select circular or linear by using the
device variables for CJ-series Unit (for setting) as shown below.
In the description hereafter, each variable name has a prefix "*". This indicates the device name when
this Unit is registered in the Unit Configuration. For details, refer to 4-1-3 Access from User Program.
A Circular Counter and a Linear Counter can use all functions provided for a High-speed Counter Unit,
and can have various setup. A Simple Counter, however, can only use the default functions.
z
Counter Value
For all Counter Types the 32-bit Counter Value is stored in the following device variables for CJ-
series Unit (for input): The data range depends on the type of 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
Name of device variable
for CJ-series Unit
Type
Name
Function
*_Ch1_LinCtVal
DINT
Counter Value
Used for a Simple Counter or Linear
Counter.
−
2,147,483,648 to +2,147,483,647
*_Ch2_LinCtVal
*_Ch1_RingCtVal
UDINT
Counter Value
Used for a Circular Counter.
0 to +4,294,967,295
*_Ch2_RingCtVal