Homing

This section describes how each homing mode works in KINGSTAR.

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.

  1. Set touch probe ID to zero in TriggerInput.
  2. 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

homingSensor

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.