Homing
Homing refers to an axis initialisation run during which the correct actual position is determined by means of a reference signal. This procedure is referred to as homing, referencing or calibration. A switch that is triggered at a known, unique position along the travel path serves as reference signal. Further signals such as the encoder zero track can be analysed in order to increase the precision.
In general a distinction is made between drive-controlled homing and NC-controlled homing. Drive-controlled homing is carried out automatically by a suitable drive without input from the control system and is not discussed in detail in this documentation. NC-controlled homing is fully controlled by the control system and supports a wide range of drive types. The different NC-controlled homing mechanisms are described below.
Position reference systems and encoder systems
A distinction is made between different position reference systems (measurement systems), depending on which position measuring system is used. An absolute measurement system provides an absolute position (directly after switching on) that is unique over the whole travel path. Such a measurement system is calibrated once and set via a persistently stored position offset. In this case homing is not required even after a system restart. In contrast, relative measurement systems provide a non-unambiguous position value (after switching on) that must be calibrated through homing. Relative measurement systems are subdivided further into purely relative systems (incremental encoders) and part-absolute systems, which only provide a unique position during a motor or encoder revolution.
- Absolute position - e.g. multi-turn encoder
- BiSS
- EnDat
- Hiperface
- SSI
- Part-absolute position - e.g. single-turn encoder
- BiSS
- EnDat
- Hiperface
- MES (Beckhoff)
- Resolver
- Relative position - incremental encoders
- Sine / cosine (sine 1 Vss)
- TTL, HTL (rectangle)
General description of a homing procedure
Figure A shows a schematic diagram of a homing procedure with individual velocity profile phases.
- When the machine is switched on the axis is in a random position (1).
- Homing is initiated, and the axis travels towards the reference cam.
- Once the reference cam is detected, the axis stops and reverses.
- The axis moves away from the reference cam and detects the falling edge of the reference cam signal.
- The axis continues and searches for a sync pulse or another distinctive event, depending on the reference mode setting. This step may be omitted where appropriate.
- The occasion is detected and the specified reference position is set.
- The axis stops at a certain distance from the reference position, which was set shortly beforehand with maximum precision.
Figures B and C show the position and velocity profile during homing.
Referencing modes
The NC system supports different referencing modes, depending on the encoder system type.
- Homing based on reference cam (Plc Cam)
The simplest axis referencing mode uses a reference cam that generates a digital signal at a defined position along the travel path. During homing the NC determines the signal edge and allocates a configurable reference position to this position. Referencing based on a reference cam is always possible, irrespective of the encoder type, and is a prerequisite for other, more precise modes. - Software Sync
Software Sync mode enhances the homing precision by additionally detecting the encoder count overflow after an encoder or motor revolution, after the reference cam signal has been detected. This mode requires a part-absolute encoder (e.g. resolver) with constant overflow interval relative to the reference cam. Overflow detection is parameterised via the Reference Mask parameter (see System Manager section). - Hardware Sync
Some encoder systems provide a sync pulse per revolution (zero track) in addition to the count. The homing precision can be enhanced by selecting this mode if the encoder evaluation logic is able to pick up the sync pulse. The precision is comparable with Software Sync. Hardware Sync mode may require parameterisation or special wiring of the drive or encoder system. - Hardware Latch
Hardware Latch reference mode (Hardware Latch Pos or Hardware Latch Neg, depending on edge) requires an external digital latch signal for storing the encoder position in the evaluation unit of the encoder system. The encoder system must support such a latch function and may have to be configured first to be able to utilize this function.
| Absolute encoder system | Part-absolute encoder system | Relative encoder system |
---|---|---|---|
NC | Referencing not required | Recommended reference mode SoftwareSync | Recommended reference mode HardwareSync |
Drive | Referencing not required | Drive setting not required | Drive parameterisation required |
Parameterization in the System Manager
Reference system: The encoder parameters reference system determines whether the encoder system used is incremental or absolute. In an absolute encoder system, the encoder value is taken from the control system without modification.
Not all NC encoders support this optional parameter, i.e., only those types that offer a choice between absolute and incremental encoder reference system (measurement system) support it (e.g., SERCOS, KL5001, M3000, ProfiDrive, Universal). This choice determines whether the actual encoder position is interpreted and evaluated as an absolute or incremental position, based on an absolute or incremental reference system (measurement system).
In an absolute reference system, no further processing takes place regarding encoder counter value overflow or underflow. It is assumed that the counter value is unique within the axis traversing range and no encoder counter value overflow or underflow occurs. Otherwise, there would be a discontinuity in the actual position, resulting in a position following error. Axis referencing via MC_Home is not possible. Instead, the actual position is calibrated once via the Position Biasparameter (zero offset / position offset).
In an incremental reference system axis referencing via MC-Home is generally required. In addition, the NC automatically detects and accounts for encoder counter value overflow or underflow events, so that continuous axis operation is possible over many months ("infinite range").
Encoder Mask (maximum value): The encoder mask determines the bit width for the incremental encoder position. The encoder mask is used for detecting and counting in range overflow events.
Scaling Factor: The scaling factor is multiplied with the incremental encoder position (including all overflows) and used as the basis for calculating an absolute axis position with the parameterized physical unit.
Position Bias (zero offset): Position offset; moves the axis coordinate system relative to the encoder coordinate system. This value is mainly used in absolute encoder systems. In relative systems an offset is usually not required since the system moves to a parameterized reference position after homing.
Invert Encoder Counting Direction: The encoder count direction can be inverted if it does not match the required logical count and travel direction.
Reference Mode: Referencing mode as described above (Plc CAM, Hardware Sync, Hardware Latch Pos, Hardware Latch Neg, Software Sync). The default mode corresponds to Plc CAM mode.
The Reference Mode parameter is used to specify the type of reference event (physical or logical event) for the referencing process. Depending on which referencing mode is parameterized the referencing procedure is either based on the hardware characteristics of the drive/encoder (e.g., hardware latch), or the reference event is only detected within the control system, i.e. without additional hardware reference.
Reference Mask: The reference mask parameterizes overflow detection for Software Sync reference mode. It is less or equal the encoder mask and defines an encoder value range, which is part absolute. Examples include the bit width of a motor revolution or the bit width of a sine period in a sine/cosine encoder. Software Sync therefore always detects the same overflow position in a part-absolute encoder system.
Calibration Value: Reference position to which the axis position is set after homing.
Invert Direction for Calibration Cam Search: The parameter inverts the axis travel direction for searching the referencing cam during homing. The standard direction is negative, i.e., towards the axis coordinate system origin.
Invert Direction for Sync Impulse Search: The parameter inverts the axis travel direction for searching the sync pulse during homing.
Referencing of coupled axes
TwinCAT enables axis coupling during referencing. The coupled axes do not necessarily have to be referenced. Axis coupling enables referencing of gantry axes, for example, provided the system can ensure that the two axes are suitably oriented relative to each another before homing. In this case the procedure is as follows:
- Ensure that both axes can be moved in coupled mode. (Position comparison is not possible at this stage, because none of the axes is referenced.)
- Couple axis 2 with axis 1.
- Start homing for axis 1. Slave axis 2 will travel with axis 1.
- Decouple the axes after the homing procedure.
- Couple axis 1 with axis 2.
- Start homing for axis 2. Slave axis 1 will travel with axis 2.
- Decouple the axes after the second homing procedure.
- Move both axes to a set position for alignment. The travel path for both axes should be minimal and may correspond to the mean value from both positions, for example.
- Couple the axes. The coupled system is now referenced.
Programming a homing procedure in the PLC
MC_Home
The MC_Home function block is used to initiate homing from the PLC. The reference mode and further parameters are configured in the System Manager as described above. Only the reference cam signal (bCalibrationCam) is fed into the block.
Drive types and I/O interface
Homing is largely independent of the drive types used. In some cases, the drive has to be parameterised, particularly if a drive latch function is used. The following section describes the AX5000 version.