Description
Motion Control instruction "MC_Home" is used to match the axis coordinates to the real, physical drive position. Homing is required for absolute positioning of the axis. The following types of homing can be executed:
-
Active homing (Mode = 3)
The homing procedure is executed automatically.
-
Passive homing (Mode = 2)
During passive homing, the "MC_Home" Motion Control instruction does not carry out any homing motion. The traversing motion required for this must be implemented by the user via other Motion Control instructions. When the homing switch is detected, the axis is homed.
-
Direct homing absolute (Mode = 0)
The current axis position is set to the value of parameter "Position".
-
Direct homing relative (Mode = 1)
The current axis position is offset by the value of parameter "Position".
-
Absolute encoder adjustment relative (Mode = 6)
The current axis position is offset by the value of parameter "Position".
-
Absolute encoder adjustment absolute (Mode = 7)
The current axis position is set to the value of parameter "Position".
Mode 6 and 7 can only be used with drives with an analog interface and PROFIdrive drive.
Requirements
-
The positioning axis technology object has been configured correctly.
-
The axis is enabled. (Not valid for PROFIdrive drive/analog drive connection Mode = 0 or 1)
-
No MC_CommandTable command may be active upon start with Mode = 0, 1, or 2.
Override response
The override response depends on the selected mode:
Mode = 0, 1, 6, 7
The MC_Home command cannot be aborted by any other Motion Control command.
The MC_Home command does not abort any active Motion Control commands. Position-related motion commands are resumed after homing according to the new homing position (value at input parameter: "Position").
Mode = 2
The MC_Home command can be aborted by the following Motion Control commands:
-
MC_Home command Mode = 2, 3
The new MC_Home command aborts the following active Motion Control command:
-
MC_Home command Mode = 2
Position-related motion commands are resumed after homing according to the new homing position (value at input parameter: "Position").
Mode = 3
The MC_Home command can be aborted by the following Motion Control commands:
-
MC_Home command Mode = 3
-
MC_Halt command
-
MC_MoveAbsolute command
-
MC_MoveRelative command
-
MC_MoveVelocity command
-
MC_MoveJog command
-
MC_CommandTable command
The new MC_Home command aborts the following active Motion Control commands:
-
MC_Home command Mode = 2, 3
-
MC_Halt command
-
MC_MoveAbsolute command
-
MC_MoveRelative command
-
MC_MoveVelocity command
-
MC_MoveJog command
-
MC_CommandTable command
Parameters
|
Parameter |
Declaration |
Data type |
Default value |
Description |
|
|---|---|---|---|---|---|
|
Axis |
INPUT |
TO_Axis |
- |
Axis technology object |
|
|
Execute |
INPUT |
BOOL |
FALSE |
Start of the command with a positive edge |
|
|
Position |
INPUT |
REAL |
0.0 |
Limit values: -1.0E12 ≤ Position ≤ 1.0E12 |
|
|
Mode |
INPUT |
INT |
0 |
Homing mode |
|
|
0 |
Direct homing (absolute) New axis position is the position value of parameter "Position". |
||||
|
1 |
Direct homing (relative) New axis position is the current axis position + position value of parameter "Position". |
||||
|
2 |
Passive homing Homing according to the axis configuration. Following homing, the value of parameter "Position" is set as the new axis position. |
||||
|
3 |
Active homing Homing procedure in accordance with the axis configuration. Following homing, the value of parameter "Position" is set as the new axis position. |
||||
|
6 |
Absolute encoder adjustment (relative) The current axis position is offset by the value of parameter "Position". The calculated absolute value offset is stored retentively in the CPU. (<AxisName>.StatusSensor.AbsEncoderOffset) |
||||
|
7 |
Absolute encoder adjustment (absolute) The current axis position is set to the value of parameter "Position". The calculated absolute value offset is stored retentively in the CPU. (<AxisName>.StatusSensor.AbsEncoderOffset) |
||||
|
Done |
OUTPUT |
BOOL |
FALSE |
TRUE |
Command completed |
|
Busy |
OUTPUT |
BOOL |
FALSE |
TRUE |
The command is being executed |
|
CommandAborted |
OUTPUT |
BOOL |
FALSE |
TRUE |
During execution, the command was aborted by another command. |
|
Error |
OUTPUT |
BOOL |
FALSE |
TRUE |
An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo". |
|
ErrorID |
OUTPUT |
WORD |
16#0000 |
Error ID for parameter "Error" |
|
|
ErrorInfo |
OUTPUT |
WORD |
16#0000 |
Error info ID for parameter "ErrorID" |
|
|
ReferenceMarkPosition |
OUTPUT |
REAL |
0.0 |
Display of the position at which the technology object was homed (valid when "Done" = TRUE) |
|
Resetting the "Homed" status
The "Homed" status of a technology object (<Axis name>.StatusBits.HomingDone) is reset under the following conditions:
-
Drive connection via PTO (Pulse Train Output) :
-
Start an "MC_Home" command for active homing
(After successful completion of the homing operation, the "Homed" status is set again.)
-
Disabling of axis by the "MC_Power" Motion Control instruction
-
Changeover between automatic mode and manual control
-
After POWER OFF → POWER ON of the CPU
-
After restart of CPU (RUN-STOP → STOP-RUN)
-
-
Technology objects with incremental actual values:
-
Start an "MC_Home" command for active homing
(After successful completion of the homing operation, the "Homed" status is set again.)
-
Error in the encoder system, or encoder failure
-
Restart of the technology object
-
After POWER OFF → POWER ON of the CPU
-
Memory reset
-
Modification of the encoder configuration
-
-
Technology objects with absolute actual values:
-
Errors in the sensor system/encoder failure
-
Replacement of the CPU
-
Modification of the encoder configuration
-
Restoration of the CPU factory settings
-
Transfer of a different project to the controller
-
Homing an axis
To home the axis, follow these stops:
-
Check the requirements indicated above.
-
Provide the necessary input parameters with values and start the homing operation with a rising edge at input parameter "Execute".
-
If output parameter "Done" and technology object variable <axis name>.StatusBits.HomingDone indicate the value TRUE, homing is complete. The reference position can be taken from the <axis name>.ReferenceMarkPosition variable.
See also
MC_Power: Enable, disable axis as of V6 (S7-1200)
MC_Reset: Acknowledge fault, restart technology object as of V6 (S7-1200)
MC_Halt: Stop axis as of V6 (S7-1200)
MC_MoveAbsolute: Absolute positioning of axis as of V6 (S7-1200)
MC_MoveRelative: Relative positioning of axis as of V6 (S7-1200)
MC_MoveVelocity: Move axis at set velocity as of V6 (S7-1200)
MC_MoveJog: Move axis in jog mode as of V6 (S7-1200)
MC_CommandTable: Run axis commands as motion sequence as of V6 (S7-1200)
MC_ChangeDynamic: Change dynamic settings of axis as of V6 (S7-1200)
MC_ReadParam: Continuously read motion data of a positioning axis as of V6 (S7-1200)
MC_WriteParam: Write tag of positioning axis as of V6 (S7-1200)