USA57 Revision
1.2
80
Appendix A
Homing Algorithm in Detail
The “Z” command is used to move the motor to a known position by seeking a home sensor.
When issued, the motor will turn toward the 0 position until the home opto-sensor is interrupted.
If the home sensor is already interrupted, the motor will back off of the sensor in the opposite
direction and then come back in until the home sensor is re-interrupted. The motor position
counter is set to zero. The homing motion is done at the current speed “V”. The maximum
number of steps allowed to go towards home without encountering the sensor is defined by the
Z command operand (n) + 400 steps. The maximum number of steps away from home (while
sensor is cut) is 10000 steps.
To set up the home flags:
First ensure that a positive move e.g. /1P100R moves away from home and the home flag. If
motor does not go away from home, flip the connections to only one of the windings of the
stepper.
The Default condition expects the output of the Home flag to be low when away from the home
sensor (as is the case in an opto). If the Home flag is high when away from the home sensor
(as in the case of a “Normally Open” switch) then issue the command /1f1R to reverse the
polarity that is expected of the home flag.
Issue the command e.g. /1Z100000R or /1f1Z100000R as necessary.
Homing should be done at a slow speed, especially if homing to a narrow Index pulse on an
encoder, which may be missed at high speeds.
The home opto sensor and flag should be set up to be unambiguous, i.e. when motor is all the
way at one end of travel, the flag should interrupt the home opto sensor. When at other end of
travel, the flag should not interrupt the home opto sensor. There should only be one High to Low
transition possible in the whole range of travel. A Homing routine can be done to either an opto
sensor (N1 Mode) or to an Index Pulse (N2 Mode).
The Main axis homes to opto1 (input #3). This opto is also the lower limit.
The Main axis uses opto 2 (input #4) as its upper limit.
Note that limits are engaged by the command “/1n2R “ (lower case “n”). The default (n0) mode
does not check the limits when moving.
Default “f” mode (f0) expects the inputs to be Low when the axis is away from the limits/home.
The command “/1f1R” reverses this.