Homing
This section describes how each homing mode works in KINGSTAR.
homingLatch
homingLatch uses a servo drive's touch probe feature to get the home position, and uses probe ID 0 in KINGSTAR as the trigger.
To use homingLatch, you need to call SetAxisTouchProbe with the following.
- Set touch probe ID to zero in TriggerInput.
- Select a phase Z signal or a digital input (DI) as your touch probe's trigger in TriggerInput.
Next, use HomeAxis to home an axis. As soon as HomeAxis is active, the axis starts the jog motion, during which the SetAxisTouchProbe is done. After the jog is finished, HomeAxis starts an Absolute move. If you use a Z signal, KINGSTAR will record the actual position of the axis and set that position as home after it receives the Z signal. If you use a DI, and the DI is connected to a sensor or a switch, KINGSTAR will set the position as home when the sensor is touched or the switch is flipped. Finally, the SetAxisTouchProbe is done.
The figure below shows the timing of each state in homing. Notice that the names of the PLC function blocks are different from those of RT/Win32 functions. The meaning of the states, such as Active and Done, can be found in the KsCommandStatus structure.
homingSoft and homingSensor
They use a homing sensor to get the home position. To use homingSoft or homingSensor, you need to specify a digital input (DI). This DI can be a bit in an I/O module or in a servo drive. The DI may be connected to a sensor. When an axis is moving and touching the sensor, the bit is changed to true (or false, for normally closed sensors).
The ways homingSoft and homingSensor work are similar. The bold text shows the difference between homingSoft and homingSensor.
homingSoft
- An axis moves in the preset homing direction using high velocity.
- An axis reverses the direction every time it touches a sensor, because the sensor's signal changes whenever the sensor is touched.
- The velocity is divided by 10 every time the direction is reversed until it finds the sensor in the preset direction at the low velocity.
homingSensor
- An axis moves in the preset homing direction using high velocity.
- The moving direction of an axis is determined by a sensor's signal. If the signal is zero, it moves forward; if the signal is one, it moves backward.
- The velocity is divided by 10 every time the direction is reversed until it finds the sensor in the preset direction at the low velocity.
When an axis is homing, it moves fast forward to the sensor and may overshoot its position, and then reverse slowly to reach the position.
How homingSoft and homingSensor work
The figure below shows how homingSoft and homingSensor work in different use cases when the homing direction is positive.
➀: an axis moves forward fast. When it touches a sensor, the sensor's signal changes, which causes the axis to change the direction. The axis moves backward slowly, and then moves forward in the slower speed until it reaches the target.
➁: an axis moves forward when the sensor's signal is zero, and moves backward when the sensor's signal is one. When the axis touches a sensor, it changes the direction and moves back and forth around the homing sensor until it reaches the target. With homingSensor, the axis may start moving backward if the sensor's signal is one when the move starts. In that case, the last direction will still be forward because the homing direction is positive.
➂: an axis touches the limit switch. Homing is cancelled.
homingSlave
Uses a servo drive's homing features to home an axis.
homingOnPosition
Sets an axis' current position as the home position. The axis does not move after you send this command. If you disconnect the axis from the KINGSTAR Subsystem and connect again, the current position's value will be the same as it was before you use homingOnPosition.
homingSlaveManual
Switches the drive to homing mode and processes the homing. No configuration of the homing method or profile is done. There is also no check for all finished homing steps.
See also
RT and Win32 – KINGSTAR Motion - Axis PTP motion
RT and Win32 – KINGSTAR Motion - Axis control
.NET API – Motion Class - Axis PTP motion
.NET API – Motion Class - Axis control
.NET Class – IAxis Interface - Methods
PLC function blocks – Single axis – Single axis movement
PLC function blocks – Single axis – TouchProbe