User's Manual
  PMAC User Manual 
130  Basic Motor Moves 
Although the homing switch does not need to be placed accurately in this type of application, it is 
important that its triggering edge remain safely between the same two index channel pulses. Also, the 
homing switch pulse must be wide enough to always contain at least one index channel pulse. 
Action on Trigger 
In the homing search move, as soon as the PMAC firmware recognizes that the hardware trigger has 
occurred, it takes several actions. It reads the position at the time of capture (usually the hardware capture 
register) and uses it and the Ix26 home offset parameter to compute the new motor zero position. As soon 
as this is done, reported positions are referenced to this new zero position (plus or minus any axis offset in 
the axis definition statement). If the axis definitions is #1->10000X+3000, the home position will be 
reported as 3000 counts. 
If software overtravel limits are used (Ix13, Ix14 not equal to zero), they are re-enabled at this time after 
having been disabled automatically during the search for the trigger. The trajectory to this new zero 
position is then calculated, including deceleration and reversal if necessary. The motor will stop under 
position control with its commanded position equal to the home position. If there is a following error, the 
actual position will be different by the amount of the following error. 
Note: 
If a software limit is too close to zero, the motor may not be able to stop and 
reverse before it hits the limit. 
Home Command 
The homing search move can be executed through either an on-line command (which can be given from a 
PLC program using the COMMAND"" syntax), or a motion program statement. 
On-Line Command 
A homing search move can be initiated with the on-line motor-specific command HOME (short form HM). 
This is simply a command to start the homing search; PMAC provides no automatic indication that the 
move is completed, unless the system is set up to recognize the in-position (IPOS) interrupt. 
Monitoring for Finish 
If monitoring the motor from the host or from a PLC program to see if it has finished the homing move, it 
is best to look at the home complete and desired velocity zero motor status word, accessed either with the 
? command, or with M-variables. The home complete bit is set to zero on power-up/reset; it is also set to 
zero at the beginning of a homing search move, even if a previous homing search move was completed 
successfully. It is set to one as soon as the trigger is found in a homing search move, before the motor has 
come to a stop. 
The home search in progress bit simply is the inverse of the home complete bit during the move: it is 1 
until the trigger is found, then 0 immediately after. Therefore, the monitoring should also look for the 
desired velocity zero status bit to become 1, which will indicate the end of the move. 
Monitoring for Errors 
A robust monitoring algorithm will look also for the possibility that the homing search move could end in 
an error condition. Often this is just part of the general error monitoring that is done at all times, looking 
for overtravel limits, fatal following errors, and amplifier faults. If an error does occur during the homing 
move, it is important to distinguish between one that occurs before the trigger has been found, and one 
that occurs after. If the error occurs after, PMAC knows where the home position is, and the homing 
search does not need to be repeated. Once the error cause has been fixed, the motor can simply be moved 
to the home position with a command such as J=0. 










