
- 92 -
(2) Pulse counter function
This is a 32 bit counter that manages real locations by counting encoder signals (external pulses).
◆ The count increases with a + direction pulse and decreases with a - direction pulse.
◆ 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 PCLSE 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
■
PCLSE CCCWTEW IWITIALIZE1
PCLSE CCCWTEW IWITIALIZE3
Parentheses contain
(EA/EB of specified axis is
Count by the output pulses
initial values.
counted,
of specified axis
When the
ier is 1 .)
Encoder signal
multipl
(Divide count:
1)
(Cutput pulse of specified
X
EA, XEB
CCCWT
axis)
CCCWT
EA, YEB
TYPE
DIVISICW
Y
PCLSE
Count pulse
D7--D0
SEL
X axis output pulse
Y axis output pulse
Pulse counter and comparator configuration
■
(Cutput pulse of specified axis)
PCLSE
<
>
Clear by latch signal
Count pulse
CLW
CCCWT LATCH SPEC SET
Command setting
EWABLE
32BIT
DWIVE DATA2, 3 PCWT
ACTC CLEAW
Data reading
Pulse counter
EWABLE
CCCWTEW DATA2, 3 PCWT
Data writing
Count data
<Comparison>
output
CCMP1
CCMP1
=
PCLSE CCCWTEW
CCMPAWE WEWISTEW1
WELCAD
<CCCWTEW DATA2, 3>
EWABLE
<Comparison>
output
PCLSE CCCWTEW
CCMP2
CCMP2
CCMPAWE WEWISTEW2
TYPE
<Comparison>
output
PCLSE CCCWTEW
CCMP3
CCMP3
CCMPAWE WEWISTEW3
TYPE
● Setting counter function
The counter and comparator functions are set with the DWIVE CCMMAWD.
See the PCLSE CCCWTEW IWITIALIZE1,2,3 command.
● Data setting of counter
Set the initial value of the pulse counter with PCLSE CCCWTEW PWESET.
Set comparator data with PCLSE CCCWTEW CCMPAWE WEWISTEW1,2,3 SET.
● Wead count data with the PCLSE CCCWTEW PCWT SELECT command and specify it.
The data can be read at all times from the DWIVE DATA1,2,3 PCWT.