L_CT1P_BacklashComp

The use of this FB is recommended if high-precision positioning has to be carried out where a direction-dependent drive backlash (e.g. backlash of a gearbox or a spindle) has to be compensated.

 WARNiNG!

The combination of backlash compensation with position control on an external encoder is not permitted.

Please note when using this FB:

 

L_CT1P_BacklashComp

AXIS_REF

-

Axis

xBusy

-

BOOL

BOOL

-

xEnable

xActive

-

BOOL

L_MC1P_ExecutionIndex

-

eExecutionIndex

xError

-

BOOL

LREAL

-

lrBacklashWidth

eErrorID

-

L_IE1P_Error

LREAL

-

lrCompTime

lrSetPosOut

-

LREAL

L_CT1P_BacklashCompMode

-

eCompMode

lrSetVelOut

-

LREAL

lrSetAccOut

-

LREAL

lrSetTorqueOut

-

LREAL

eContactState

-

L_CT1P_BacklashContactState

Inputs

Name

Data type

Info/adjustment options

Axis

AXIS_REF

Transfer of the axis data structure

Motion axes (AXIS_REF)

xEnable

BOOL

 

FALSE -> TRUE

Activation of the FB

Activation or deactivation (TRUE <-> FALSE) can only take place when the axis is locked ("Disabled" status)

eExecutionIndex

L_MC1P_ExecutionIndex

Execution index

A maximum of two setpoint-correcting FBs can be connected to one axis. The call sequence is defined via this input.

Selection:

L_MC1P_ExecutionIndex.First := 1,

L_MC1P_ExecutionIndex.Second := 2

lrBacklashWidth

LREAL

Width of the backlash on the output side.

Initial value: 0

For modulo axes, the value must be smaller than the cycle length of the axis

Note:

The value can be adapted during operation and is adopted if the compensation does not add a position correction, i.e. if one of the conditions applies:

eCompMode = NegativeComp and eContactState = PositiveContact or

eCompMode = PositiveComp and eContactState = NegativeContact

lrCompTime

LREAL

Duration for backlash compensation in seconds

Initial value: 0.1s

Note:

The value can be adapted during operation and is adopted if no transition trajectory is active,i.e:

eContactState = PositiveContact or

eContactState = NegativeContact

eCompMode

L_CT1P_BacklashCompMode

Direction selection for compensation

Typically, the compensation direction should be the inverse of the referencing direction.

The value is accepted once with a positive xEnable edge

1: NegativeComp (initial value)

  • The backlash is negatively compensated in the negative direction of movement

  • There is no compensation in the positive direction

2: PositiveComp

  • The backlash is positively compensated in the positive direction of movement

  • There is no compensation in the negative direction

Outputs

Name

Data type

Value/meaning

xBusy

BOOL

TRUE

The FB was added to the AXIS_REF setpoint path.

xActive

BOOL

TRUE

The backlash compensation is active

xError

BOOL

TRUE

An error has occurred. For details, see eErrorID .

eErrorID

L_IE1P_Error

If xError = TRUE: Error number for the error that has occurred.

lrSetPosOut

LREAL

Modified target position

This output is used for analysis. It is not necessary to connect the output.

lrSetVelOut

LREAL

Modified target speed

This output is used for diagnostics. It is not necessary to switch the output.

lrSetAccOut

LREAL

Modified target acceleration

This output is used for diagnostics. It is not necessary to switch the output.

lrSetTorqueOut

LREAL

Modified target torque

This output is used for diagnostics. It is not necessary to switch the output.

eContactState

L_CT1P_BacklashContactState

State of the backlash compensation

0: Unknown

Initial state of the function block. It is not known whether/which contact is present

1: NegativeContact

The backlash compensation compensates in the negative direction

2: PositiveContact

The backlash compensation compensates in the positive direction

3: PositiveToNegative

The backlash compensation changes from positive to negative compensation

4: NegativeToPositive

The backlash compensation changes from negative to positive compensation