
- 93 -
(3) Pulse differential counter function
This is a 32 bit counter that detects the differential number of pulses by counting two types of
optional pulses.
It can also be used as a pulse counter that counts one type of optional pulses.
◆ Select optional pulses from encoder signals (external pulses) and drive pulses output.
The count
pulse is as follows.
・ Count pulse 1 of the differential counter increases the count in the + direction and decreases it
in the - direction.
・ Count pulse 2 of the differential counter increases the count in the - direction and decreases it
in the + direction.
・ The count pulse of the pulse counter increases the count in the + direction and decreases it in
the - direction.
◆ The effective area of the counter is from -2,147, 483, 647 to +2,147,483,647 (H'8000_0001 to
H'7FFF_FFFF).
A negative number is indicated by two's complement.
◆ If the effective area is exceeded, an overflow occurs, and STATCS4 PCWT DFL CVF=1 is assumed.
Even if the overflow occurs, the counting function is valid and can be used as a ring counter.
By optionally setting the maximum count of the counter (valid area), rotary system locations can be
managed.
Pulse selector for pulse differential counter
■
DFL CCCWTEW IWITIALIZE1
DFL CCCWTEW IWITIALIZE3
(EA/EB of specified axis Count by the output
Parentheses contain initial
is counted,
pulses of specified
values.
When the
axis
(1 divide of (Divide
multipl
ier is 1 .)
count pulse) count : 1)
Encoder signal
(EA of
XEA, XEB
CCCWT
specified axis)
CCCWT
DIVISICW DIVISICW
Count pulse 1
YEA, YEB
TYPE
(EB of
PCLSE
TYPE
D7--D0
specified axis)
X axis
Count pulse 2
output pulse
SEL
*If a pulse counter is selected
for the pulse of the pulse
Y axis
differential counter, the output
output pulse
pulse of a specified axis starts
from count pulse 1.
Pulse differential counter and comparator configuration
■
DFL
<
>
Clear by latch signal
Count pulse 1
CLW
CCCWT LATCH SPEC SET
Count pulse 2
Command setting
32BIT
EWABLE
DWIVE DATA2, 3 PCWT
ACTC CLEAW
Pulse differential
Data reading
EWABLE
counter
CCCWTEW DATA2, 3 PCWT
Data writing
Count data
<Comparison>
output
CCMP1
CCMP1
=
DFL CCCWTEW
CCMPAWE WEWISTEW1
WELCAD
<CCCWTEW DATA2, 3>
EWABLE
<Comparison>
output
DFL CCCWTEW
CCMP2
CCMP2
CCMPAWE WEWISTEW2
TYPE
<Comparison>
output
DFL CCCWTEW
CCMP3
CCMP3
CCMPAWE WEWISTEW3
TYPE
CCMP
DETECTICW TYPE
● Setting counter function
Set the counter and comparator functions with the DFL CCCWTEW IWITIALIZE1,2,3 SET.
● Data setting of counter
Set the initial value of the pulse differential counter with the DFL CCCWTEW PWESET command.
Set comparator data with the DFL CCCWTEW CCMPAWE WEWISTEW1,2,3 SET.
● Wead count data with the DFL CCCWTEW PCWT SELECT command and specify it.
The data can be read at all times from the DWIVE DATA1,2,3 PCWT.