FB_VelocityRatioAlgorithm - General Information

Overview

Type:

Function block

Available as of:

V1.0.0.0

Inherits from:

-

Implements:

-

Versions:

Current version

Task

Algorithm for the FB_Infeed POU that is designed for uniform product motion

Description

The algorithm calculates a preferably flat velocity curve for a product that is transferred to the first belt controlled by it so that the product is located on the target allocated to it when leaving the last belt controlled by the algorithm. When the product is transferred to the first belt, the target is allocated to it that is closest to the target belt and can be reached with the set parameters.

The algorithm is intended for use with extraordinary, unordered product flows. In order to avoid idle cycles caused by irregularly incoming product flows, we recommend the use of a velocity feed forward control with the downstream machine. This can be achieved with the FB_VelocityRatio­FeedForward POU.

The products are not transferred synchronously from one belt to the other when using this algorithm. Due to the velocity differences of the belts at product transfer, the algorithm is not suitable for sensitive products.

The algorithm requires at least 3 correction belts that all have to be configured as master belt with the target belt.

NOTE: The method IF_Infeed.EndOfAlgorithm has to be called cyclicly after the call of this function block. The function block does not take back the flags for product detection like xInkate by himself.

Interface

Input

Data type

Description

i_xEnable

BOOL

A rising edge FALSE -> TRUE activates the POU, a falling edge TRUE -> FALSE deactivates the POU.

A deactivated POU does not execute any actions.

i_xStart

BOOL

TRUE: The algorithm is started.

i_xWsSelect

BOOL

If i_xWsSelect TRUE when the POU is started via i_xStart, a warm start is performed.

i_xDiagQuit

BOOL

A rising edge FALSE -> TRUE acknowledges the diagnostic messages of the POU.

i_ifInfeed

IF_Infeed

 The instance of the FB_Infeed POU for which the algorithm is to be executed

Output

Data type

Description

q_xActive

BOOL

TRUE: The POU is active and has to be executed further.

FALSE: The POU is inactive.

q_xReady

BOOL

TRUE: The POU is ready to operate and can accept user commands.

FALSE: The function block is not ready to accept user commands.

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = GD.ET_Diag.Ok -> status message

q_etDiag <> GD.ET_Diag.Ok -> diagnostic message

q_sMsg

STRING[80]

Event-triggered message which gives more detailed information on the diagnostic state.

Input/Output

Data type

Description

iq_stParameter

ST_VelRatioParameter

The parameters of the POU

iq_stFeedback

ST_VelRatioFeedback

The return values of the POU

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Disabled

1

The POU is disabled.

OK

Initializing

2

The POU is being initialized.

OK

WaitForStart

3

Waiting for starting command.

OK

WarmstartExecuting

5

A warm start is being executed.

OK

Working

6

The POU is working.

ExecutionAborted

MaxNrOfTargetsReached

74

The maximum number of manageable targets has been reached.

ExecutionAborted

NoTargetExisting

76

No target could be found.

InputParameterInvalid

AccRange

61

Acc is outside the valid range.

InputParameterInvalid

BackwardCorrectionAlarmWindowRange

106

BackwardCorrectionAlarmWindow is outside the valid range.

InputParameterInvalid

BeltTypeInvalid

77

BeltType is invalid.

InputParameterInvalid

CamMasterMinVelocityRange

102

CamMasterMinVelocity is outside the valid range.

InputParameterInvalid

DecRange

62

Dec is outside the valid range.

InputParameterInvalid

FirstLastVelBeltIndexMissmatch

98

The specifications of FirstVelBeltIndex and LastVelBeltIndex are contradictory.

InputParameterInvalid

FirstVelBeltIndexRange

96

FirstVelBeltIndex is outside the valid range.

InputParameterInvalid

ForwardCorrectionLimitAlarmWindowRange

105

ForwardCorrectionLimitAlarmWindow is outside the valid range.

InputParameterInvalid

InfeedInvalid

94

An invalid infeed POU has been transferred.

InputParameterInvalid

LastVelBeltIndexRange

97

LastVelBeltIndex is outside the valid range.

InputParameterInvalid

MasterBeltIdRange

52

MasterBeltId is outside the valid range.

InputParameterInvalid

MaxVelocityDifferencePercentRange

103

MaxVelocityDifferencePercent is outside the valid range.

InputParameterInvalid

RefreshBeltIndexHigherLastBeltIndex

101

RefreshBeltIndex is greater than LastBeltIndex.

InputParameterInvalid

RefreshBeltIndexLowerFirstBeltIndex

100

RefreshBeltIndex is smaller than FirstBeltIndex.

UnexpectedProgramBehavior

JobBufferOverflow

78

Too many motion commands have been issued.

UnexpectedProgramBehavior

MaxNrOfTargetsReached

74

The maximum number of manageable targets has been reached.

UnexpectedProgramBehavior

UnknownCase

48

The POU is in an undefined state.

UnexpectedProgramBehavior

UnknownFeedback

20

An unexpected error occurred during execution.

AccRange

Enumeration name:

AccRange

Enumeration value:

61

Description:

Acc is outside the valid range.

Issue

Cause

Solution

-

At the FB_Infeed.ifVelRatio.lrAcc input, an invalid value has been transferred to the the infeed instance transferred at the i_ifInfeed input.

A value greater than 0 must be transferred at the input FB_Infeed.ifVelRatio.lrAcc of the connected infeed instance.

BackwardCorrectionAlarmWindowRange

Enumeration name:

BackwardCorrectionAlarmWindowRange

Enumeration value:

106

Description:

BackwardCorrectionAlarmWindow is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stParameter.lrBackwardCorrectionAlarmWindow.

It must be made sure that a value greater than or equal to 0 is transferred at the input iq_stParameter.lrBackwardCorrectionAlarmWindow.

BeltTypeInvalid

Enumeration name:

BeltTypeInvalid

Enumeration value:

77

Description:

BeltType is invalid.

Issue

Cause

Solution

-

The belt configuration of the infeed POU transferred at the i_ifInfeed input is not correct.

The infeed POU transferred at the i_ifInfeed input must be parameterized with belts of type ET_BeltType.Series from iq_stParameter.udiFirstVelBeltIndex to iq_stParameter.udiLastVelBeltIndex.

CamMasterMinVelocityRange

Enumeration name:

CamMasterMinVelocityRange

Enumeration value:

102

Description:

CamMasterMinVelocity is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stParameter.lrCamMasterMinVelocity.

It must be made sure that a value greater than or equal to 1.0 is transferred at the input iq_stParameter.lrCamMasterMinVelocity.

DecRange

Enumeration name:

DecRange

Enumeration value:

62

Description:

Dec is outside the valid range.

Issue

Cause

Solution

-

At the FB_Infeed.ifVelRatio.lrDec input, an invalid value has been transferred to the infeed instance transferred at the i_ifInfeed input.

A value greater than 0 must be transferred at the input FB_Infeed.ifVelRatio.lrDec of the connected infeed instance.

Disabled

Enumeration name:

Disabled

Enumeration value:

1

Description:

The POU is disabled.

The function block is deactivated, it executes no actions whatsoever. i_xEnable and q_xActive have the value FALSE.

FirstLastVelBeltIndexMissmatch

Enumeration name:

FirstLastVelBeltIndexMissmatch

Enumeration value:

98

Description:

The specifications of FirstVelBeltIndex and LastVelBeltIndex are contradictory.

Issue

Cause

Solution

-

The values transferred at the inputs iq_stParameter.udiFirstVelBeltIndex and iq_stParameter.udiLastVelBeltIndex do not match.

It must be made sure that the value of the input iq_stParameter.udiLastVelBeltIndex is greater than or equal to the value of iq_stParameter.udiFirstVelBeltIndex plus two.

FirstVelBeltIndexRange

Enumeration name:

FirstVelBeltIndexRange

Enumeration value:

96

Description:

FirstVelBeltIndex is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stParameter.udiFirstVelBeltIndex.

It must be made sure that a value is transferred at the iq_stParameter.udiFirstVelBeltIndex input that is greater than 0 and smaller than the number of parameterized belts of the infeed instance transferred at the i_ifInfeed input.

ForwardCorrectionLimitAlarmWindowRange

Enumeration name:

ForwardCorrectionLimitAlarmWindowRange

Enumeration value:

105

Description:

ForwardCorrectionLimitAlarmWindow is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stParameter.lrForwardCorrectionLimitAlarmWindow.

It must be made sure that a value greater than or equal to 0 is transferred at the input iq_stParameter.lrForwardCorrectionLimitAlarmWindow.

InfeedInvalid

Enumeration name:

InfeedInvalid

Enumeration value:

94

Description:

An invalid infeed POU has been transferred.

Issue

Cause

Solution

-

An invalid value has been transferred at the input i_ifInfeed.

It must be made sure that the instance of the FB_Infeed POU is transferred at the i_ifInfeed input on which the algorithm shall work.

Initializing

Enumeration name:

Initializing

Enumeration value:

2

Description:

The POU is being initialized.

The POU is being initialized and thus is not yet ready to receive commands at its inputs.

The POU will signalize that it is ready for operation with the signal q_xReady = TRUE.

JobBufferOverflow

Enumeration name:

JobBufferOverflow

Enumeration value:

78

Description:

Too many motion commands have been issued.

Issue

Cause

Solution

-

An error occurred in the internal execution.

Please inform the support team about this error.

LastVelBeltIndexRange

Enumeration name:

LastVelBeltIndexRange

Enumeration value:

97

Description:

LastVelBeltIndex is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stParameter.udiLastVelBeltIndex.

It must be made sure that a value is transferred at the iq_stParameter.udiLastVelBeltIndex input that is greater than 0 and smaller than the number of parameterized belts of the infeed instance transferred at the i_ifInfeed input.

MasterBeltIdRange

Enumeration name:

MasterBeltIdRange

Enumeration value:

52

Description:

MasterBeltId is outside the valid range.

Issue

Cause

Solution

-

The belt configuration of the infeed POU transferred at the i_ifInfeed input is not correct.

The belts from iq_stParameter.udiFirstVelBeltIndex to iq_stParameter.udiLastVelBeltIndex of the infeed POU transferred at the i_ifInfeed input must all have been allocated the last belt of the infeed distance as cam master.

MaxNrOfTargetsReached

Enumeration name:

MaxNrOfTargetsReached

Enumeration value:

74

Description:

The maximum number of manageable targets has been reached.

Issue

Cause

Solution

-

More products have been detected than targets are available.

The method IF_Infeed.EndOfAlgorithm has to be called cyclicyaly after the call of this function block.

The value of Gc_udiMaxNumberOfTargets must be increased.

It must be made sure that always less than Gc_udiMaxNumberOfTargets products are located on the belts from iq_stParameter.udiFirstVelBeltIndex to iq_stParameter.udiLastVelBeltIndex.

MaxVelocityDifferencePercentRange

Enumeration name:

MaxVelocityDifferencePercentRange

Enumeration value:

103

Description:

MaxVelocityDifferencePercent is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stParameter.lrMaxVelocityDifferencePercent.

It must be made sure that a value greater than 0 and smaller than 100 is transferred at the input iq_stParameter.lrMaxVelocityDifferencePercent.

NoTargetExisting

Enumeration name:

NoTargetExisting

Enumeration value:

76

Description:

No target could be found.

Issue

Cause

Solution

-

The target allocated to a product has been deleted.

It must be made sure that targets are not deleted before the product allocated to it has left the last belt controlled by the algorithm.

RefreshBeltIndexHigherLastBeltIndex

Enumeration name:

RefreshBeltIndexHigherLastBeltIndex

Enumeration value:

101

Description:

RefreshBeltIndex is greater than LastBeltIndex.

Issue

Cause

Solution

-

The values transferred at the inputs iq_stParameter.udiRefreshVelRatioBeltIndex and iq_stParameter.udiLastVelBeltIndex do not match.

It must be made sure that the value of the input iq_stParameter.udiLastVelBeltIndex is greater than or equal to the value of iq_stParameter.udiRefreshVelRatioBeltIndex.

RefreshBeltIndexLowerFirstBeltIndex

Enumeration name:

RefreshBeltIndexLowerFirstBeltIndex

Enumeration value:

100

Description:

RefreshBeltIndex is smaller than FirstBeltIndex.

Issue

Cause

Solution

-

The values transferred at the inputs iq_stParameter.udiRefreshVelRatioBeltIndex and iq_stParameter.udiFirstVelBeltIndex do not match.

It must be made sure that the value of the input iq_stParameter.udiFirstVelBeltIndex is smaller than or equal to the value of iq_stParameter.udiRefreshVelRatioBeltIndex.

UnknownCase

Enumeration name:

UnknownCase

Enumeration value:

48

Description:

The POU is in an undefined state.

Issue

Cause

Solution

-

An error occurred in the internal execution.

Please inform the support team about this error.

UnknownFeedback

Enumeration name:

UnknownFeedback

Enumeration value:

20

Description:

An unexpected error occurred during execution.

Issue

Cause

Solution

-

An error occurred in the internal execution.

Please inform the support team about this error.

WaitForStart

Enumeration name:

WaitForStart

Enumeration value:

3

Description:

Waiting for starting command.

The POU has completed its initialization and is waiting for a positive edge at the i_xStart input before continuing the processing.

WarmstartExecuting

Enumeration name:

WarmstartExecuting

Enumeration value:

5

Description:

A warm start is being executed.

A warm start is being executed.

Working

Enumeration name:

Working

Enumeration value:

6

Description:

The POU is working.

The algorithm controls the belts.

Methods

Name

Description

RegisterLoggerPoint

Registers the internal logger point in the Application Logger.

Properties

Name

Data type

Accessing

Description

lrDeltaXMax

LREAL

Read

 

lrDeltaXMin

LREAL

Read

 

lrNextTargetDistance

LREAL

Read