FB_InfeedSimulation - General Information

Overview

Type:

Function block

Available as of:

V1.0.0.0

Versions:

Current version

Task

Simulation of a product flow for the FB_Infeed POU

Description

The POU generates virtual products for the FB_Infeed and calculates the motion of the products on the basis of the belt motions. The virtual product flow is output in a visualization and the Touchprobe signals for the FB_Infeed POU are simulated according to this virtual product flow.

The simulation of the Touchprobe signals is updated in the pattern of the Sercos task.

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 POU is started and the product flow is simulated.

i_xWsSelect

BOOL

If i_xWsSelect TRUE when the POU is started via i_xStart, a warm start is performed. The last product flow is not deleted.

i_ifInfeed

IF_Infeed

The instance of the FB_Infeed POU for which the product flow is to be simulated

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_stSimParameter

ST_SimParameter

The parameters of the POU

iq_stFeedback

ST_SimFeedback

The return values of the POU

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Disabling

7

The POU is being disabled.

OK

Disabled

1

The POU is disabled.

OK

Initializing

2

The POU is being initialized.

OK

WaitForStart

3

Waiting for starting command.

OK

Working

6

The POU is working.

ControllerConditionInvalid

NoTimeInterface

26

The controller does not support all required time functionalities.

ExecutionAborted

InfeedNotReady

95

The infeed distance is not ready.

InputParameterInvalid

DistanceGroupRange

35

DistanceGroup is outside the valid range.

InputParameterInvalid

DistanceRange

34

Distance is outside the valid range.

InputParameterInvalid

InfeedInvalid

94

An invalid infeed POU has been transferred.

InputParameterInvalid

MaxDistanceGroupSmallerMinDistanceGroup

90

MaxDistenceGroup must not be smaller than MinDistanceGroup.

InputParameterInvalid

MaxDistanceSmallerMinDistance

88

MaxDistance must not be smaller than MinDistance.

InputParameterInvalid

MaxSignalsInGroupSmallerMinSignalsInGroup

92

MaxSignalsInGroup must not be smaller than MinSignalsInGroup.

InputParameterInvalid

MaxVarianceSmallerMinVariance

86

MaxVariance must not be smaller than MinVariance.

InputParameterInvalid

MinDistanceGroupRange

91

MinDistanceGroup is outside the valid range.

InputParameterInvalid

MinDistanceRange

89

MinDistance is outside the valid range.

InputParameterInvalid

ModeInvalid

65

An invalid Mode has been selected.

InputParameterInvalid

NumberOfSignalsInPatternRange

93

NumberOfSignalsInPattern is outside the valid range.

InputParameterInvalid

SignalsInGroupRange

87

SignalsInGroup is outside the valid range.

InputParameterInvalid

StartOffsetRange

85

StartOffset is outside the valid range.

UnexpectedProgramBehavior

InterfaceCastFailed

15

The object does not support all required interfaces.

UnexpectedProgramBehavior

UnknownCase

48

The POU is in an undefined state.

UnexpectedProgramBehavior

UnknownFeedback

20

An unexpected error occurred during execution.

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.

Disabling

Enumeration name:

Disabling

Enumeration value:

7

Description:

The POU is being disabled.

The POU is being disabled.

DistanceGroupRange

Enumeration name:

DistanceGroupRange

Enumeration value:

35

Description:

DistanceGroup is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stSimParameter.stProductGeneration.lrDistanceGroup.

ET_SimGenerateMode.EquidistantGroups has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stProductGeneration.lrDistanceGroup.

-

An invalid value has been transferred at the input iq_stSimParameter.stTargetSignalGeneration.lrDistanceGroup.

ET_SimGenerateMode.EquidistantGroups has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stTargetSignalGeneration.lrDistanceGroup.

DistanceRange

Enumeration name:

DistanceRange

Enumeration value:

34

Description:

Distance is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stSimParameter.stProductGeneration.lrDistance.

ET_SimGenerateMode.Equidistant or ET_SimGenerateMode.EquidistantGroups has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stProductGeneration.lrDistance.

-

An invalid value has been transferred at the input iq_stSimParameter.stTargetSignalGeneration.lrDistanceGroup.

ET_SimGenerateMode.Equidistant or ET_SimGenerateMode.EquidistantGroups has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stTargetSignalGeneration.lrDistance.

InfeedInvalid

Enumeration name:

InfeedInvalid

Enumeration value:

94

Description:

An invalid infeed POU has been transferred.

Issue

Cause

Solution

-

An invalid object has been applied at the input i_ifInfeed.

It must be made sure that the instance of the FB_Infeed POU is transferred to the i_ifInfeed input, the product flow of which is to be simulated.

InfeedNotReady

Enumeration name:

InfeedNotReady

Enumeration value:

95

Description:

The infeed distance is not ready.

Initializing

Enumeration name:

Initializing

Enumeration value:

2

Description:

The POU is being initialized.

The function block 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.

InterfaceCastFailed

Enumeration name:

InterfaceCastFailed

Enumeration value:

15

Description:

The object does not support all required interfaces.

Issue

Cause

Solution

-

An error occurred in the internal execution.

Please inform the support team about this error.

MaxDistanceGroupSmallerMinDistanceGroup

Enumeration name:

MaxDistanceGroupSmallerMinDistanceGroup

Enumeration value:

90

Description:

MaxDistenceGroup must not be smaller than MinDistanceGroup.

Issue

Cause

Solution

-

The entries at the inputs iq_stSimParameter.stProductGeneration.lrMaxDistanceGroup and iq_stSimParameter.stProductGeneration.lrMinDistanceGroup are contradictory.

ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that a value greater than or equal to iq_stSimParameter.stProductGeneration.lrMinDistanceGroup is applied at the input iq_stSimParameter.stProductGeneration.lrMaxDistanceGroup.

-

The entries at the inputs iq_stSimParameter.stTargetSignalGeneration.lrMaxDistanceGroup and iq_stSimParameter.stTargetSignalGeneration.lrMinDistanceGroup are contradictory.

ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be made sure that a value greater than or equal to iq_stSimParameter.stTargetSignalGeneration.lrMinDistanceGroup is applied at the input iq_stSimParameter.stTargetSignalGeneration.lrMaxDistanceGroup.

MaxDistanceSmallerMinDistance

Enumeration name:

MaxDistanceSmallerMinDistance

Enumeration value:

88

Description:

MaxDistance must not be smaller than MinDistance.

Issue

Cause

Solution

-

The entries at the inputs iq_stSimParameter.stProductGeneration.lrMaxDistance and iq_stSimParameter.stProductGeneration.lrMinDistance are contradictory.

ET_SimGenerateMode.Random or ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that a value greater than or equal to iq_stSimParameter.stProductGeneration.lrMinDistance is applied at the input iq_stSimParameter.stProductGeneration.lrMaxDistance.

-

The entries at the inputs iq_stSimParameter.stTargetSignalGeneration.lrMaxDistance and iq_stSimParameter.stTargetSignalGeneration.lrMinDistance are contradictory.

ET_SimGenerateMode.Random or ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be made sure that a value greater than or equal to iq_stSimParameter.stTargetSignalGeneration.lrMinDistance is applied at the input iq_stSimParameter.stTargetSignalGeneration.lrMaxDistance.

MaxSignalsInGroupSmallerMinSignalsInGroup

Enumeration name:

MaxSignalsInGroupSmallerMinSignalsInGroup

Enumeration value:

92

Description:

MaxSignalsInGroup must not be smaller than MinSignalsInGroup.

Issue

Cause

Solution

-

The entries at the inputs iq_stSimParameter.stProductGeneration.udiMaxProductsInGroup and iq_stSimParameter.stProductGeneration.udiMinProductsInGroup are contradictory.

ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that a value greater than or equal to iq_stSimParameter.stProductGeneration.udiMinProductsInGroup is applied at the input iq_stSimParameter.stProductGeneration.udiMaxProductsInGroup.

-

The entries at the inputs iq_stSimParameter.stTargetSignalGeneration.udiMaxTargetsInGroup and iq_stSimParameter.stTargetSignalGeneration.udiMinTargetsInGroup are contradictory.

ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be made sure that a value greater than or equal to iq_stSimParameter.stTargetSignalGeneration.udiMinTargetsInGroup is applied at the input iq_stSimParameter.stTargetSignalGeneration.udiMaxTargetsInGroup.

MaxVarianceSmallerMinVariance

Enumeration name:

MaxVarianceSmallerMinVariance

Enumeration value:

86

Description:

MaxVariance must not be smaller than MinVariance.

Issue

Cause

Solution

-

The entries at the inputs iq_stSimParameter.stProductGeneration.lrMaxVariance and iq_stSimParameter.stProductGeneration.lrMinVariance are contradictory.

ET_SimGenerateMode.Equidistand or ET_SimGenerateMode.EquidistandGroups has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that a value greater than or equal to iq_stSimParameter.stProductGeneration.lrMinVariance is applied at the input iq_stSimParameter.stProductGeneration.lrMaxVariance.

-

The entries at the inputs iq_stSimParameter.stTargetSignalGeneration.lrMaxVariance and iq_stSimParameter.stTargetSignalGeneration.lrMinVariance are contradictory.

ET_SimGenerateMode.Equidistand or ET_SimGenerateMode.EquidistandGroups has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be ensured that a value greater than or equal to iq_stSimParameter.stTargetSignalGeneration.lrMinVariance is applied at the input iq_stSimParameter.stTargetSignalGeneration.lrMaxVariance.

MinDistanceGroupRange

Enumeration name:

MinDistanceGroupRange

Enumeration value:

91

Description:

MinDistanceGroup is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stSimParameter.stProductGeneration.lrMinDistanceGroup.

ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stProductGeneration.lrMinDistanceGroup.

-

An invalid value has been transferred at the input iq_stSimParameter.stTargetSignalGeneration.lrMinDistanceGroup.

ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stTargetSignalGeneration.lrMinDistanceGroup.

MinDistanceRange

Enumeration name:

MinDistanceRange

Enumeration value:

89

Description:

MinDistance is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stSimParameter.stProductGeneration.lrMinDistance.

ET_SimGenerateMode.Random or ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stProductGeneration.lrMinDistance.

-

An invalid value has been transferred at the input iq_stSimParameter.stTargetSignalGeneration.lrMinDistance.

ET_SimGenerateMode.Random or ET_SimGenerateMode.RandomGroups has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stTargetSignalGeneration.lrMinDistance.

ModeInvalid

Enumeration name:

ModeInvalid

Enumeration value:

65

Description:

An invalid Mode has been selected.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stParameter.stProductGeneration.etMode.

It must be made sure that an element of ET_SimGenerateMode is transferred at the input iq_stParameter.stProductGeneration.etMode.

-

An invalid value has been transferred at the input iq_stParameter.stTargetSignalGeneration.etMode.

It must be made sure that an element of ET_SimGenerateMode is transferred at the input iq_stParameter.stTargetSignalGeneration.etMode.

NoTimeInterface

Enumeration name:

NoTimeInterface

Enumeration value:

26

Description:

The controller does not support all required time functionalities.

Issue

Cause

Solution

-

The connected controller does not support all required functionalities.

Use a controller that supports all required functionalities.

NumberOfSignalsInPatternRange

Enumeration name:

NumberOfSignalsInPatternRange

Enumeration value:

93

Description:

NumberOfSignalsInPattern is outside the valid range.

Issue

Cause

Solution

-

No products have been defined at the input iq_stSimParameter.stProductGeneration.alrPattern.

ET_SimGenerateMode.Pattern has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that at least the first element has a value greater than 0 at the input iq_stSimParameter.stProductGeneration.alrPattern.

-

No targets have been defined at the input iq_stSimParameter.stTargetSignalGeneration.alrPattern.

ET_SimGenerateMode.Pattern has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be made sure that at least the first element has a value greater than 0 at the input iq_stSimParameter.stTargetSignalGeneration.alrPattern.

SignalsInGroupRange

Enumeration name:

SignalsInGroupRange

Enumeration value:

87

Description:

SignalsInGroup is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stSimParameter.stProductGeneration.udiProductsInGroup.

ET_SimGenerateMode.EquidistantGroups has been selected at the input iq_stSimParameter.stProductGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stProductGeneration.udiProductsInGroup.

-

An invalid value has been transferred at the input iq_stSimParameter.stTargetSignalGeneration.udiProductsInGroup.

ET_SimGenerateMode.EquidistantGroups has been selected at the input iq_stSimParameter.stTargetSignalGeneration.etMode.

It must be made sure that a value greater than 0 is transferred at the input iq_stSimParameter.stTargetSignalGeneration.udiProductsInGroup.

StartOffsetRange

Enumeration name:

StartOffsetRange

Enumeration value:

85

Description:

StartOffset is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the input iq_stSimParameter.stProductGeneration.lrStartOffset.

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

-

An invalid value has been transferred at the input iq_stSimParameter.stTargetSignalGeneration.lrStartOffset.

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

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.

Working

Enumeration name:

Working

Enumeration value:

6

Description:

The POU is working.

The product flow is being simulated.

Methods

Name

Description

RegisterLoggerPoint

Registers the internal logger point in the Application Logger.