3 Operation and Configuration
3-2
Counter Types
Every individual counter of the Counter Unit can be set independently to one of the following counter
Types (for an overview of the differences between Circular and Linear Counters refer to section 1-4
Quick Start Up Reference Guide):
• Circular Counter (refer to Section 3-2-1 Circular Counter)
• Linear Counter (refer to Section 3-2-2 Linear Counter)
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 section 4-1-3 Access from User Pro-
gram.
Name of device variable
for CJ-series Unit
*_Ch1_CtTypCfg
*_Ch2_CtTypCfg
*_Ch3_CtTypCfg
*_Ch4_CtTypCfg
Counter Value
For all Counter Types the 32-bit Counter Value is stored in the 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
*_Ch1_LinCtVal
*_Ch2_LinCtVal
*_Ch3_LinCtVal
*_Ch4_LinCtVal
*_Ch1_RingCtVal
*_Ch2_RingCtVal
*_Ch3_RingCtVal
*_Ch4_RingCtVal
3-2-1
Circular Counter
Configuring Circular Counters
Circular counters are set with the following device variables for CJ-series Units (for setting).
Name of device variable
for CJ-series Unit
*_Ch1_CtTypCfg
*_Ch2_CtTypCfg
*_Ch3_CtTypCfg
*_Ch4_CtTypCfg
A Circular Counter has 32-bits (the full counting range) available to count up- or downwards over the
positive counting range between 0 and the Upper Count Limit.
3-4
Type
Name
UINT
Counter Type
Type
Name
DINT
Counter Value
UDINT
Type
Name
UINT
Counter Type
CJ-series 4-Channel Counter Unit Operation Manual for NJ-series CPU Unit (W512)
Function
Counter Type selection
0: Circular counter type
1: Linear counter type
Function
Counter Value for Linear Counter
-2,147,483,648 to +2,147,438,647 Pulses
Counter Value for Circular Counter
0 to +4,294,967,295 Pulses
Function
Counter Type Selection
0: Circular counter type
1: Linear counter type