Description
Homing is the procedure a machine goes through to establish its coordinate system. Homing is needed if the machine does not have any position sensors or if the position sensors are incremental. Machines using absolute encoders
do not home as their position can be determined directly.
The process involves moving each machine axis in a manner so as to find a machine feature with a know position for that axis. The feature might be a homing sensor or it might be a mechanical interference such as a hard stop. It is necessary to think
through the homing process to insure that the machine is always moving in a way that prevents collisions. For example, a descending transfer machine will likely need to first home the vertical axis upwards and out of the way of material below the machine. Once
the machine is up then it has freedom to move laterally without a collision threat. Homing must avoid collisions from any possible initial condition. If this is not possible absolute encoders may be required.
Homing To A Sensor
A series of examples will be shown from simplest to methods that offer higher performance.
This is a simple homing procedure:
The initial speed is relatively high minimizing the time to find the sensor. Once found the motor reverses so as to find the trailing edge at a slower more accurate speed. The controller is checking the sensor every sample period. The sample period is usually 1000 Hz.
As long as the second searching speed is slower than 1000 counts per second this will home accurately to an individual encoder count.
This alternative procedure avoids use of the abrupt Abort command and is just as accurate:
Although accurately homed a position display would show that the axis is not at 0 but at a number which corresponds to the decel distance after the sensor edge was found. Seeing the position after homing not be "0" is, for some applications, unexpected. If that is a concern the
motor can be moved back to zero:
Homing can be performed faster by using the Capture features in the controller that accurately record a position at speeds far faster than the controller sample rate:
These examples are assuming that everything works properly. If the sensor fails, or there is a problem and the motor never moves, these routines will continue to wait for the changing sensor condition. To prevent indefinite waiting a timeout is sometimes used. The expectation is that some
event will occur before a certain amount of time has elapsed. If that event does not occur then something has gone wrong. In a motion system a more robust idea is a position out rather than a time out. A position out is the idea that some event should occur before a certain distance has occurred. If that
event does not occur then again something has gone wrong. This routine is better since the failure of the motion system or sensor can be detected and indicated with an escape code:
When working with homing sensors it is important to insure that sufficient decel distance is available after the sensor has been detected for the homing speed desired. It is also important to not be able to pass the sensor. If the sensor is initially found to be tripped the motion system must move
off the sensor. The condition needed is the change in level of the sensor indicating the sensor edge. If the machine can pass the home sensor then it is ambiguous which way the machine needs to go to find the edge.
Homing To A Hard Stop
Hard stop homing requires that the axis have an encoder. Although there are back-emf ways to determine that a motor has stopped without an encoder these methods require significant speed and hard stop homing can cause machine impact at such speeds. Hard stop homing must be more tentative than
sensor based homing since there is no decel distance. This is an example of a block list that performs hard stop homing:
Related Topics
Positive Limit
Negative Limit
CapturePosition