Execute mc_home – Rockwell Automation 2080-LC50 Getting Started with Motion Control Using a Simulated Axis User Manual
Page 65

Publication 2080-QS001A-EN-E - January 2013
55
Execute Your Motion Control Function Blocks Chapter 5
Execute MC_Home
The MC_Home function block commands the axis to perform the "search home" sequence. The Home Sensor is
connected to the configured Home Switch input (see
Configure Homing Properties on page 12
for the configuration).
For this simulation, the initial position is initialized to 300 mm so that when the homing sequence starts in the negative
direction, the axis moves to the left until the Home Sensor is reached. The axis then reverses direction and creeps back until
the Home Sensor is encountered again and the Home Sensor input transitions from True to False. The negative edge is used
to mark the Home position.
The function block completes at "StandStill" if the homing sequence is successful.
MC_Home can only be aborted by the function blocks MC_Stop or MC_Power. Any abort attempt from other moving
function blocks will result in function block failure with Error ID = MC_FB_ERR_STATE. However, homing operation
is not interrupted, and can be executed as usual.
Upper
Right
Limit
Lower
Left
Limit
Home
Sensor
The axis reverses direction as soon as it
encounters the Home Sensor.
The following sequence describes the homing method used in this simulation project:
1. Moving part moves to its left side (in negative direction);
2. When home switch is detected, the moving part decelerates to a stop;
3. Moving part moves back (in positive direction) in creep velocity to detect Home Switch On
→ Off edge.
4. Once Home Switch On
→ Off is detected, record the position as mechanical home position, and
decelerate to stop;
5. Move to the configured home position (the mechanical home position recorded during moving back
sequence, plus the home offset configured in axis configuration in Connected Components Workbench.