
- 113 -
11-10. Counter
11-10-1. Counter type and input method
In addition to the positioning counter, this LSI contains four other counters. These counters offer the
following functions.
Control command position and mechanical position
Detect a stepper motor that is "out of step" using COUNTER3 (deflection counter) and a
comparator.
Output a synchronous signal using COUNTER4 (general-purpose) and a comparator.
The positioning counter is loaded with an absolute value for the RMV register (target position) with each
start command, regardless of the operation mode selected. It decreases the value with each pulse that is
output. However, if MPCS (bit 14) of the RMD register (operation mode) is set to 1 and a position
override 2 is executed, the counter does will not decrease until the PCS input turned ON.
Input to COUNTER1 is exclusively for output pulses. However COUNTERS2 to 4 can be selected as
follows by setting the RENV3 register (environment setting 3).
COUNTER1
Command position
COUNTER2
Mechanical
position
Up/down counter
28
Possible
Possible
Possible
Not possible
COUNTER3
Deflection
COUNTER4
General-purpose
Counter name
Counter type
Number of bits
Output pulse
Encoder (EA/EB) input
Pulsar (PA/PB) input
1/2 of reference clock
Note: When using pulsar input, use the internal signal result after multiplying or dividing.
Up/down counter
28
Possible
Not possible
Not possible
Not possible
Deflection counter Up/down counter
16
Possible
Possible
Possible
Not possible
28
Possible
Possible
Possible
Not possible
Specify COUNTER2 (mechanical position) input <CI20 to 21 (bit 8 & 9) in RENV3>
00: EA/EB input
01: Output pulses
10: PA/PB input
Set COUNTER3 (deflection) input <CI30 to 31 (bit 10 & 11) in RENV3>
00: Measure the deflection between output pulses and EA/EB input
01: Measure the deflection between output pulses and PA/PB input
10: Measure the deflection between EA/EB input and PA/PB input
Set COUNTER4 (general-purpose) input <CI40 to 41 (bit 12 & 13) in RENV3>
00: Output pulses
01: EA/EB input
10: PA/PB input
11: Reference clock (CLK) / 2.
[RENV3] (WRITE)
15
-
-
-
-
-
-
n
n
8
[RENV3] (WRITE)
15
-
-
-
-
n
n
-
-
8
[RENV3] (WRITE)
15
-
-
n
n
-
-
-
-
8
The EA/EB and PA/PB input terminal, that are used as inputs for the counter, can be set for one of two
signal input types by setting the RENV2 (environment setting 2) register.
1) Signal input method: Input 90
Counter direction:
Count up when the EA input phase is leading. Count down when the EB input
phase is leading.
2) Signal input method: Input 2 sets of positive and negative pulses.
Counter direction:
Count up on the rising edge of the EA input. Count down on the falling edge of
the EB input.
The counter direction or EA/EB and PA/PB input signals can be reversed.
The LSI can be set to sense an error when both the EA and EB input, or both the PA and PB inputs
change simultaneously, and this error can be detected using the REST (error interrupt cause) register.
4x)