SMC_Homing (FB)

 

FUNCTION_BLOCK SMC_Homing

This function block causes the execution of a homing drive of the axis axis. If SMC_Homing is executed, the axis is moved at fVelocityFast in the direction specified by nDirection as long as bEndSwitch = FALSE. The reference switch is then closed. The axis is decelerated and driven at fVelocitySlow in the opposite direction. At the point at which the refer­ence switch opens with bEndSwitch = TRUE, the reference position fHomePosition is set and the drive is stopped.

InOut:

Scope

Name

Type

Initial

Comment

Inout

Axis

AXIS_REF_SM3

Input

bExecute

BOOL

FALSE

fHomePosition

LREAL

0

Rising edge: Starts the execution of the function block.

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

MC_Direction

negative

Direction: positive or negative

bReferenceSwitch

BOOL

TRUE

TRUE: Switches the reference.

fSignalDelay

LREAL

0

Time [s] for bReferenceSwitch to be transmitted.

nHomingMode

SMC_HOMING_MODE

FAST_BSLOW_S_STOP

Homing mode

bReturnToZero

BOOL

FALSE

TRUE: Moves to position zero after homing.

bIndexOccured

BOOL

FALSE

Index pulse

fIndexPosition

LREAL

0

Position where index occured

bIgnoreHWLimit

BOOL

FALSE

TRUE: Sets bHWLimitEnable = 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 except MoveSuperImposed.

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 inputs bIndexOccured and fIndexPosition.