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".
Requirements
-
The axis technology object has been configured correctly.
-
The axis is enabled.
-
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
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_1 |
- |
Axis technology object |
|
|
Execute |
INPUT |
BOOL |
FALSE |
Start of the command with a positive edge |
|
|
Position |
INPUT |
REAL |
0.0 |
Limit values: -1.0E+12 ≤ Position ≤ 1.0E+12 |
|
|
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. |
||||
|
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" |
|
|
Note Axis homing is lost under the following conditions:
|
Homing an axis
To home the axis, follow these stops:
-
Check the requirements indicated above.
-
Initialize 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 tag <Axis name>.StatusBits.HomingDone indicate the value TRUE, homing is complete.
See also
S7-1200 Motion Control V4...5 (S7-1200)
MC_Power: Enable, disable axis V1...3 (S7-1200)
MC_Reset: Acknowledge fault, restart technology object V1...3 (S7-1200)
MC_Halt: Stop axis V1...3 (S7-1200)
MC_MoveAbsolute: Absolute positioning of axis V1...3 (S7-1200)
MC_MoveRelative: Relative positioning of axis V1...3 (S7-1200)
MC_MoveVelocity: Move axis at set velocity V1...3 (S7-1200)
MC_MoveJog: Move axis in jog mode V1...3 (S7-1200)
MC_CommandTable: Run axis commands as motion sequence V2...3 (S7-1200)
MC_ChangeDynamic: Change dynamic settings of axis V2...3 (S7-1200)