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
Axis
Input
bExecute
BOOL
FALSE
Rising edge: Starts the execution of the function block.
fHomePosition
LREAL
0
Home position; set after homing (in technical unit [u])
fVelocitySlow
LREAL
0
Low velocity; used to drive out of the reference switch [u/s]
fVelocityFast
LREAL
0
High velocity; used until reference switch is found [u/s]
fAcceleration
LREAL
0
Value of the acceleration (increasing energy of the motor) [u/s^2]
fDeceleration
LREAL
0
Value of the deceleration (decreasing energy of the motor) [u/s^2]
fJerk
LREAL
0
Value of the Jerk [u/s^3]
nDirection
negative
The direction for the fast movement searching the reference switch. (
positive
ornegative
)bReferenceSwitch
BOOL
TRUE
TRUE
: The switch is open (the drive is not in the switch)FALSE
: The switch is closed (the drive is in the switch)fSignalDelay
LREAL
0
Time [s] for
bReferenceSwitch
to be transmitted.nHomingMode
FAST_BSLOW_S_STOP
Homing mode
bReturnToZero
BOOL
FALSE
TRUE
: Moves to position zero after homing.bIndexOccured
BOOL
FALSE
TRUE
: Index pulse has been detected, the index position is stored in inputfIndexPosition
.fIndexPosition
LREAL
0
Position where index occured
bIgnoreHWLimit
BOOL
FALSE
TRUE
: SetsbHWLimitEnable
=FALSE
during homing.Output
bDone
BOOL
FALSE
TRUE
: Homing has been done.bBusy
BOOL
TRUE
: FB is not idle.bCommandAborted
BOOL
FALSE
TRUE
: Commanded motion has been interrupted by any motion FB acting on the same axis exceptMoveSuperImposed
.bError
BOOL
FALSE
TRUE
: Error has occured within function block.nErrorID
SMC_ERROR
0
Error identification
bStartLatchingIndex
BOOL
For 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 inputsbIndexOccured
andfIndexPosition
.