4.3.4. Automatic Home position calibration¶
Autocalibration (homing) is used for detection and placing the movement to the starting position (it can also be called “home” or “zero” position). Calibration comes to automatic accurate detection of the limit switch, the revolution sensor signal or moment of getting the external synchronization pulse which determines the zero position, and grading from it by a specified offset. This allows one to start working in a situation when the current position of the stage is unknown, but the location of one reference point (initial position) relative to the limit switch or some other signal is known. The homing process does not require programming skills from the user.
The reference point (stop signal) is determined in one of three ways, depending on the settings selected by the user:
- Movement until the limit switch is reached - in this case, the current settings of the limit switches (location, polarity) are used. For more details please refer to Motion range and limit switches chapter.
- Movement until a signal from the revolution sensor is received, in this case the current settings of the revolution sensor are used. For more details please refer to Position control chapter.
- Movement until the signal from the synchronization input is received, in this case the actual configuration of synchronization input is used. For more details please refer to Synchronization settings chapter.
If the synchronization input is software-disabled in the appropriate settings menu, then the signal from it will never be processed.
188.8.131.52. Standard homing algorithm¶
Depending on the settings the homing can be processed using three different algorithms. The standard search for a home position is the following: the controller starts moving with the preset parameters of speed and movement direction until a stop signal is received. The speed of homing is usually set lower than the working speed in order to “not miss” the arrival of the stop signal and improve the calibration accuracy. Then an absolute offset is made at a working speed to the preset standoff distance.
The resulting point is called the starting position or “home position”. It is important to note that its location on the stage does not depend on the initial position from which calibration started.
184.108.40.206. Accurate additional calibration¶
After the stop signal is received the position of the controller is already determined. But before making a shift to the home position one can perform the additional movement towards the next stop signal (the second phase of homing). This allows to reach an accuracy in setting a home position of 1/256 steps for stepper motors or 1 encoder count for DC and BLDC motors for some stages. If the corresponding flag is set, the controller rotates the motor in a user-defined direction with the preset speed until a stop signal is received from the source selected by the user. Then, as for the standard algorithm, the offset is made at a working speed to the preset standoff distance.
The parameters of the second phase of homing (speed, movement direction and the source of the stop signal) are set independently of the first phase parameters settings. At the same time it is reasonable to use the signal from the revolution sensor placed on the motor shaft previous to the gear and perform movement at a low speed - this will provide the maximum accuracy. Since the stop signals for the first movement and the second movement can coincide, a special flag is provided in the software to start tracking the stop signal for the second movement only after making a half turn of the motor shaft. This avoids the ambiguous sequence of receiving stop signals for the first and second movements. As a result of the optional second movement the calibrated position is refined.
In case the second phase of homing is used the first movement can be performed at high speed since it only roughly calibrates the position and accuracy is not required there. The accuracy will not be increased in case the second limit switch is used for the second phase of motion since its physical parameters do not differ from those of the first limit switch.
220.127.116.11. Fast homing algorithm¶
When the fast homing is enabled the controller starts to rotate the motor towards the preset direction with a working speed in order to quickly find the position of the reference point. After the stop signal is received the controller pulls the motor back for half a turn and starts moving again in the preset direction but takes the speed value specified in the settings of the first phase of homing. After the repeated stop signal is received the offset is made at a working speed to the preset standoff distance. The stop signal source is also set by the standard homing algorithm settings.
The fast homing algorithm is optimal for most stages and stages and as a rule is set by default in the profile settings for most of the Standa stages.
18.104.22.168. Autocalibration features¶
Successful completion of home position calibration results in assertion of the STATE_IS_HOMED flag in the controller state structure. In case the home position is somehow lost after the calibration (stop on limit switch, immediate stop while moving, the detection of loss of steps, switching to the alarm mode), the corresponding flag is dropped and it is necessary to re-calibrate the home position.
The position reached as a result of calibration will slightly depend on the speed of the last motion until the selected sensor responsed. Therefore, don’t change the speed parameters for further successful reaching the same position.
The description of the functions for auto-calibrating a home position is given in the Programming guide chapter.
Autocalibration commands are described in the Communication protocol specification chapter.
Autocalibration can be configured by the user in the XILab program on the Device tab -> Home position (see the section Home position settings), and started with the Go home button in the XILab main window.
A set_zero script is supplied with XiLab software pack, providing the automatic home position configuration. This script changes the Standoff setting at Home position settings tab, making the actual position as the Home one.
How to use the script:
- place the movement to the desired position,
- launch the script and wait until it’s finished.
As a result, the stage will be moved in the same position where the set_zero script was called and all the following calls of homing function will move it there. Make sure to save the settings to controller’s nonvolatile memory.