SMC_BacklashCompensation (FB)

 

FUNCTION_BLOCK SMC_BacklashCompensation

This function block can be used to compensate the backlash which arises for example at a belt drive or in a gear-box.

For this purpose a (usually virtual) master axis gets mirrored on the real slave axis, whose backlash should be compensated. The function block works similar to a phasing function block, the phase depends on the direction of the master axis. If the master axis starts in a certain direction, the slave axis does the same plus an additional movement (distance: fBacklash) in this direction; if the master axis inverts, the slave axis also turns around and additionally covers the double distance fBacklash in this new direction.

Take care that the master axis and the slave axis are at the same posi­tion when the module starts working, because otherwise the slave axis would be positioned on the master axis.

InOut:

Scope

Name

Type

Initial

Comment

Inout

Master

AXIS_REF_SM3

Reference to master axis

Slave

AXIS_REF_SM3

Reference to slave axis

Input

bExecute

BOOL

Rising edge: Starts the execution of the function block. It stays active until the slave axis gets interrupted by another movement, or if an error occurs.

fBacklash

LREAL

Distance/Backlash to be compensated.

fCompensationVel

LREAL

Additional velocity, which should be used for the compensation.

fCompensationAcc

LREAL

Additional acceleration, which should be used for the  compensation.

fCompensationDec

LREAL

Additional deceleration, which should be used for the compensation.

fCompensationJerk

LREAL

Additional jerk, which should be used for the compensation.

eBacklashMode

SMC_BACKLASH_MODE

SMC_BL_AUTO

The mode of backlash compensation.

SMC_BL_AUTO : Direction in which the master axis moves;

determines the compensa­tion direction.

SMC_BL_POSITIVE : Compen­sation in positive direction,

independent on the move­ment of the master axis.

SMC_BL_NEGATIVE : Compensation in negative direction,

independent on the move­ment of the master axis.

SMC_BL_OFF : No compensation

eBacklashStartState

SMC_BACKLASH_STARTSTATE

SMC_BL_START_NONE

The start condition of the axis.

SMC_BL_START_NEGATIVE : The slave axis is under trac­tion in negative

direction, that is: a move­ment in negative direction needs no compensation; in case of a movement in positive direction the double fBacklash-distance will be made up.

SMC_BL_START_POSITIVE : The slave axis is under trac­tion in positive

direction, that is: a move­ment in positive direction needs no compensation; in case of a movement in negative direction the double fBacklash-distance will be made up.

SMC_BL_START_NONE : The slave axis is not under trac­tion; a movement

in positive or negative direction will cause a corre­sponding compensating movement of distance fBacklash.

Output

bBusy

BOOL

TRUE: Execution of the function block is not finished yet.

bCommandAborted

BOOL

TRUE: Command has been aborted by another command.

bError

BOOL

TRUE: Error has occured within the function block.

iErrorID

SMC_ERROR

Error identification

bCompensating

BOOL

TRUE: While compensating a backlash.