RCK_DriftCompensation (FB)

FUNCTION_BLOCK RCK_DriftCompensation

This function block is implemented to compensate the cutter drift which the cutter leaves it original position during the rotary cutter system runs for a long time that means the cutter axis stops at home position, but the cutter is not at the position where the homing sensor is. Usually, this is caused by the lost of precision from floating-point calculation or the relative slide between the cutter and the motor shaft.

An external function block or program should be used to capture the position of cutter axis when the cutter crosses the homing senor. The capture done signal and the detected cutter axis position need to be connected to the inputs SwitchDetected and DetectedPositon.

This function block can only be activated when cutter state is in “Automatic”.

Input AccLimit is used to define the percentage during the compensation which acceleration and deceleration work.

../../../../../../../_images/AccLimitForCompensation.png

Note

The unit of MaxDeviation, MaxCompensation, DetectedPosition of cutter axis must be degree as the same in cutter axis setting page.

InOut:

Scope

Name

Type

Initial

Comment

Input

Enable

BOOL

FALSE

Enable the function block with Enable = TRUE

MaxDeviation

LREAL

10.0

[Degree] specified maximum allowed deviation. Range: > 0 and <= 180/NumberOfCutter

MaxDeviationCountValue

INT

10

Specified maximum allowed times which the detected deviation continuously exceeds MaxDeviation. Range: >=0 and <= 100

MaxCompensation

LREAL

10.0

[Degree] Specified maximum amount of single compensation allowed. Range: >0 and <= MaxDeviation

AccLimit

LREAL

50.0

[Percentage] Defines the percentage during the compensation which acceleration and deceleration work. Range: >= 0 and <= 100

SwitchDetected

BOOL

FALSE

The signal from external to indicate that a new position is deteced

DetectedPosition

LREAL

0.0

[Degree] the detected cutter axis position

Output

Done

BOOL

Shows the status of the command. Done = TRUE if the execution is finished

Busy

BOOL

Indicates that the function block is not finished

Active

BOOL

Indicates that drift compensation is working

Error

BOOL

Signals that error has occurred within function block

ErrorID

AC500_MotionControl.ERROR_ID

Error identification. For error details refer to Enumeration AC500_MotionControl.ERROR_ID

AppErrorID

ERROR_ID

Error identification. For error details refer to Enumeration ERROR_ID

CurrentDeviation

LREAL

the current detected deviation

MaxDeviationCounter

INT

the counter of how many times which the detected deviation continuously exceeds MaxDeviation, reset to zero automatically if the detected deviation is less than MaxDeviation

Inout

RotaryCutter

RCK_RotaryCutter

Reference to rotary cutter