SMC_Homing (FB)ΒΆ
FUNCTION_BLOCK SMC_Homing
This function block causes the execution of a homing sequence.
If SMC_Homing is executed, the axis is moved at fVelocityFast in
the direction specified by nDirection as long as the reference switch
is open (bReferenceSwitch := TRUE).
Once the reference switch is closed (bReferenceSwitch := FALSE), the axis is
decelerated and driven at fVelocitySlow (the direction depends on the homing mode).
At the point at which the reference switch opens again (bReferenceSwitch := TRUE),
the following actions are performed:
the index pulse and index position are used (optionally), the reference position
fHomePosition is set, the drive is stopped.
(The order of these actions depends on the homing mode, see SMC_HOMING_MODE.)
- InOut:
Scope
Name
Type
Initial
Comment
Inout
AxisInput
bExecuteBOOLRising edge: Starts the execution of the function block.
fHomePositionLREALHome position; set after homing (in technical unit [u])
fVelocitySlowLREALLow velocity; used to drive out of the reference switch [u/s]
fVelocityFastLREALHigh velocity; used until reference switch is found [u/s]
fAccelerationLREALValue of the acceleration (increasing energy of the motor) [u/s^2]
fDecelerationLREALValue of the deceleration (decreasing energy of the motor) [u/s^2]
fJerkLREALValue of the Jerk [u/s^3]
nDirectionnegative
The direction for the fast movement searching the reference switch. (
positiveornegative)bReferenceSwitchBOOLTRUE
TRUE: The switch is open (the drive is not in the switch)FALSE: The switch is closed (the drive is in the switch)fSignalDelayLREALTime [s] for
bReferenceSwitchto be transmitted.nHomingModeFAST_BSLOW_S_STOP
Homing mode
bReturnToZeroBOOLTRUE: Moves to position zero after homing.bIndexOccuredBOOLTRUE: Index pulse has been detected, the index position is stored in inputfIndexPosition.fIndexPositionLREALPosition where index occured
bIgnoreHWLimitBOOLDisables the limit switch handling in the driver by setting
bHWLimitEnabletoFALSEduring homing. Please note that for most servo drives, this is necessary but not sufficient to disable the limit switch handling in the drive. Often, the limit switch handling in the drive must be deactivated by other means before calling SMC_Homing, and reactivated when SMC_Homing is done. (For example by writing a drive-specific configuration object.)Output
bDoneBOOLTRUE: Homing has been done.bBusyBOOLTRUE: FB is not idle.bCommandAbortedBOOLTRUE: Commanded motion has been interrupted by any motion FB acting on the same axis exceptMoveSuperImposed.bErrorBOOLTRUE: Error has occured within function block.nErrorIDSMC_ERRORError identification*
bStartLatchingIndexBOOLFor some homing modes, the index pulse is evaluated.
TRUE: Storing of the index pulse has been started and must be done by the application. The result is expected in the inputsbIndexOccuredandfIndexPosition.