CY545 Stepper System Controller
www.ControlChips.com
© 2002 Cybernetic Micro Systems
Chapter 6 - Bit Function Commands
24
Step/Test/Seek Home Command
Finally, one command uses the bits to control special motions, and cause stepping during the bit
testing. It is:
H Bit
Step to Home, using specified signal
The values of the parameters for this command are treated the same as the
Til
and
Wait
commands. That is, for the
Home
command, the bits are tested for a match to the parameter
value.
As the CY545 steps the motor for this command, it will run at a constant step rate, with no
acceleration or deceleration. The desired step rate is chosen by the First Rate parameter, set by
the F command. The actual step rate is a derivative of the rates in the
CY545 Step Rate Table
.
For the
Home
command (and the Jog pin function), the CY545 will divide the selected rate by
20. When operating at 12 MHz, this gives a range of about 1 step per second to about 1000
steps per second for this command.
The
Home
command starts by testing the specified bit pattern for a match with the external
signals. If there is a match, the CY545 will begin by stepping in the CCW direction, and will
continue in this direction until there is no longer a match.
When there is no match between the bit parameter and the external signals, the CY545 steps in
the CW direction. It will continue to step in this direction until the signals match the parameter
value. At this point the CY545 stops, and sets the current position to zero.
Thus, the
Home
command steps the motor to seek the edge between a match and no match
condition on the home signal. The CY545 then stops at the first step where a match occurs, and
is always stepping in the CW direction looking for this match. This mechanism should always
seek the same mechanical position, since any directional backlash is compensated by using the
same CW step direction in seeking the final home position.
If the CY545 runs into one of the limits while looking for the home signal, it will abort the home
command and stop stepping. The current position is not changed to zero in this case.
Special Note Regarding Older Versions
This special note applies only to the chip version prior to the CY545A. The older CY545s drive the BUSY
line low at the beginning of the Home command, then leave it low after the home position has been found.
This means that the CY545 does not indicate ready for the next command on the parallel command
interface.
There are two approaches to solving this problem. First, if the CY545 is displaying the position for every
step that it takes, and the position display is going to the parallel interface, the BUSY signal will be driven
to the ready state when the CY545 completes the home function. See the Mode command for details on
position display during home.
The other approach is to issue the first character of the next command with a blind handshake, and wait
for the CY545 to accept the character. With this approach, you should place the command character on
the data bus, then drive IO_REQUEST low for 100 usec. Drive it high again after 100 usec, then wait for
500 usec. If the CY545 drives the BUSY signal high, it has accepted this first character, and is ready for
the next character of th70e command. Otherwise, repeat the blind handshake until the CY545 drives the
BUSY signal high.
While the CY545 is performing the home function, it will ignore the IO_REQUEST signal. However, when
it finishes, and sees the blind handshake described above, it will accept the next command character,
then drive the BUSY signal high again. At this point it will be ready for a normal handshake for the rest of
the command sequence.