◆ Home() [1/2]

virtual void Home ( )
pure virtual

Execute the homing routine.

ℹ This function is avaliable in RapidCode and RapidSequencer

Part of the Homing method group.

Description:
Home executes the homing routine as configured with the other homing methods. At the completion of finding the index / marker pulse, or the desired switch, the Axis will set the Home Offset, and then move to the zero position. If you don't want the Axis to move to zero after homing, use the overloaded method and set "moveToZero" false.
Sample Code:
MasterBasedHoming
axis.HardwareNegLimitActionSet(RSIAction.RSIActionSTOP); // Neg Limit action set to STOP.
axis.HomeMethodSet(RSIHomeMethod.RSIHomeMethodImprovedFALLING_HOME_NEGATIVE_START_POSITIVE_MOMENTUM); // Set the method to be used for homing.
axis.HomeVelocitySet(Constants.VELOCITY); // Set the home velocity.
axis.HomeSlowVelocitySet(Constants.VELOCITY / 10); // Set the slow home velocity. (used for final move, if necessary)
axis.HomeAccelerationSet(Constants.ACCELERATION); // Set the acceleration used for homing.
axis.HomeDecelerationSet(Constants.DECELERATION); // Set the deceleration used for homing.
axis.HomeOffsetSet(0.5); // HomeOffsetSet sets the position offset from the home (zero) position.
axis.Home(); // Execute the homing routine.
if (axis.HomeStateGet() == true) // HomeStateGet returns true if the Axis is homed.
{
Console.WriteLine("Homing successful\n");
}
axis.ClearFaults(); // Clear faults created by homing.
axis.AmpEnableSet(false); // Disable the motor.
Notes:
Be sure to set Home Action to RSIActionSTOP. Also set HW Positive/Negative Limit actions to STOP if homing with limit switches.
See also
HomeMethodSet, HomeOffsetSet, HomeVelocitySet, HomeAccelerationSet, HomeDecelerationSet, HomeActionSet

Click here for detailed Home Method diagrams