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
bExecuteBOOLFALSE
Rising edge: Starts the execution of the function block.
fHomePositionLREAL0
Home position; set after homing (in technical unit [u])
fVelocitySlowLREAL0
Low velocity; used to drive out of the reference switch [u/s]
fVelocityFastLREAL0
High velocity; used until reference switch is found [u/s]
fAccelerationLREAL0
Value of the acceleration (increasing energy of the motor) [u/s^2]
fDecelerationLREAL0
Value of the deceleration (decreasing energy of the motor) [u/s^2]
fJerkLREAL0
Value 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)fSignalDelayLREAL0
Time [s] for
bReferenceSwitchto be transmitted.nHomingModeFAST_BSLOW_S_STOP
Homing mode
bReturnToZeroBOOLFALSE
TRUE: Moves to position zero after homing.bIndexOccuredBOOLFALSE
TRUE: Index pulse has been detected, the index position is stored in inputfIndexPosition.fIndexPositionLREAL0
Position where index occured
bIgnoreHWLimitBOOLFALSE
TRUE: SetsbHWLimitEnable=FALSEduring homing.Output
bDoneBOOLFALSE
TRUE: Homing has been done.bBusyBOOLTRUE: FB is not idle.bCommandAbortedBOOLFALSE
TRUE: Commanded motion has been interrupted by any motion FB acting on the same axis exceptMoveSuperImposed.bErrorBOOLFALSE
TRUE: Error has occured within function block.nErrorIDSMC_ERROR0
Error 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.