NOVA electronics Inc.
MCX514 -
34
-
34
-
2.3
Position Control
MCX514 has two 32-bit up-and-down counters per axis for controlling the current position (logical position counter and real
position counter), which can compare with the current position by presetting a value to a multi-purpose register. In addition, the
software limit function and variable ring function can be set to the logical and real position counters.
2.3.1
Logical Position Counter and Real position Counter
The logical position counter counts driving pulses in MCX514. When one + direction pulse is output, the counter will count up 1,
and when one – direction pulse is output, the counter will count down 1.
The real position counter counts input pulse numbers from external encoder. The type of input pulse can be selected from either
quadrature pulses type or Up / Down pulse type. (See chapter 2.12.3)
The host CPU can read or write these two counters anytime. The counting range is between -2,147,483,648 ~ +2,147,483,647 and
2's complement is used for negative numbers. The values of the logical and real position counters are undefined at reset.
Logical Position Counter
Real Position Counter
32bit
32bit
UP
DOWN
UP
DOWN
nECA/PPIN
nECB/PMIN
nPP/PLS/PA
nPM/DIR/PB
Encoder input pulse
Read / Write
Read / Write
Waveform
Transformation
Driving output pulse
Waveform
Transformation
Fig. 2.3-1 Position Counter Functional Block Diagram
2.3.2
Position Comparison
MCX514 has four multi-purpose registers per axis, which can be used to compare with the current position of the logical and real
position counters. The comparison result of a multi-purpose register with the logical / real position counter can be read out even
while driving. And when it meets the comparison condition, a signal can be output, or an interrupt or synchronous action
activation can be executed.
For more details of the multi-purpose register comparison functions, see chapter 2.4.
2.3.3
Software Limit
Software limit can be set to the logical position counter and real position counter in each axis. The object of software limit can be
set by D14 bit of WR2 register. Two 32-bit registers (SLMT+, SLMT-) which set the software limit must be set the software limit
position of
+
/– direction individually.
When the value of the logical/real position counter that the software limit is set is larger than the value of SLMT+ register,
decelerating stop or instant stop is executed and D0 bit of RR2 register becomes 1. This error status will be cleared when the
– direction driving command is executed and the value of the logical/real position counter is smaller than the value of SLMT+
register. It is the same with the SLMT- register of – direction.
In + direction software limit, if “position counter
≧
SLMT+ value”, software limit error occurs. In
− direction software limit, if
“position counter
<
SLMT
− value”, software limit error occurs.
Fig. 2.3-2 is the example of SLMT+ register = 10000, SLMT
− register = − 1000 and software limit function is enabled.