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 position when the module starts working, because otherwise the slave axis would be positioned on the master axis.
- InOut:
Scope
Name
Type
Initial
Comment
Inout
MasterReference to master axis
SlaveReference to slave axis
Input
bExecuteBOOLRising 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.
fBacklashLREALDistance/Backlash to be compensated.
fCompensationVelLREALAdditional velocity, which should be used for the compensation.
fCompensationAccLREALAdditional acceleration, which should be used for the compensation.
fCompensationDecLREALAdditional deceleration, which should be used for the compensation.
fCompensationJerkLREALAdditional jerk, which should be used for the compensation.
eBacklashModeSMC_BL_AUTO
The mode of backlash compensation.
- SMC_BL_AUTO: Direction in which the master axis moves;
determines the compensation direction.
- SMC_BL_POSITIVE: Compensation in positive direction,
independent on the movement of the master axis.
- SMC_BL_NEGATIVE: Compensation in negative direction,
independent on the movement of the master axis.
SMC_BL_OFF: No compensation
eBacklashStartStateSMC_BL_START_NONE
The start condition of the axis.
- SMC_BL_START_NEGATIVE: The slave axis is under traction in negative
direction, that is: a movement 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 traction in positive
direction, that is: a movement 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 traction; a movement
in positive or negative direction will cause a corresponding compensating movement of distance
fBacklash.
Output
bBusyBOOLTRUE: Execution of the function block is not finished yet.bCommandAbortedBOOLTRUE: Command has been aborted by another command.bErrorBOOLTRUE: Error has occured within the function block.iErrorIDSMC_ERRORError identification
bCompensatingBOOLTRUE: While compensating a backlash.