FB_StartSimulation

 

FB_StartSimulation - General Information

Overview

Type:

Function block

Available as of:

V1.0.4.0

Versions:

Current version

Task

Function block for simulating the start signals of a station of the MultiBelt. It is used to simulate a product flow of a preceding machine, e.g. during commissioning or simulating the machine.

Description

After Enable and Start, the POU generates signals in intervals that can be parameterized which can be used as start signals.

The type of signal generation is specified by the enumeration from ET_StartSimulationMode and the ST_StartSimulationParameter parameter structure.

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

A rising edge starts signal generation.

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.

q_xStartSignal

BOOL

Output for the start signals that have to be written on the ST_ModuleStation.i_rstParameter.xStart parameter of the MultiBelt interface.

q_xMissingSignal

BOOL

If the parameter xMissingSignals is TRUE, then the with lrPercentageOfSignalsMissing specified percentage of signals is given out on this output and not at q_xStartSignal.

q_lrSignalInterval

LREAL

The distance between the last signal and the next one.

q_lrActualVariance

LREAL

In the simulation modes ET_StartSimulationMode.Equidistant and ET_StartSimulationMode.EquidistantGroups, the variance of the next signal from the reference position (time) is output.

Input/Output

Data type

Description

iq_stParameter

ST_StartSimulationParameter

Input for the structure to parameterize the signal generation.

Description of the simulation modes

The simulation modes are described in more detail in the following. The addressed parameters must be entered in the ST_StartSimulationParameter structure. In this structure, the simulation mode must be selected from the ET_StartSimulationMode enumeration. By setting the parameter xUseTime to FALSE, the POU operates on position basis and all the distance parameters have to be entered in the unit of the master belt. By setting the parameter xUseTime to TRUE, the function block operates on time basis and all the distance parameters have to be entered in milliseconds.

Equidistant

G-SE-0064894.1.gif-high.gif

 

 

In this simulation mode, lrDistance signals are generated in fixed distances. By setting xStatisticalVariation, the signals are shifted in a window lrNegativeVariance to lrPositiveVariance. The specified reference position of the signal given by the lrDistance does not change. This avoids an addition of statistical deviations. Each signal is one program cycle long.

EquidistantGroups

G-SE-0064895.1.gif-high.gif

 

 

In this simulation mode, a number of diSignalsPerGroup signals are generated as groups in fixed distances by lrDistance. A distance of lrGroupDistance is maintained between the groups. By setting xSubModeStatisticalVariation, the signals are shifted in a window lrNegativeVariance to lrPositiveVariance. The specified reference position of the signals given by lrDistance and lrGroupDistance does not change. This avoids an addition of statistical deviations. Each signal is one program cycle long.

Random

G-SE-0064896.1.gif-high.gif

 

 

In this simulation mode, a random sequence of signals is generated. A signal follows the preceding signal in a random distance between lrMinDistance and lrMaxDistance. Each signal is one program cycle long. An addition of statistical deviations is not avoided. Each signal is one program cycle long.

RandomGroups

G-SE-0064897.1.gif-high.gif

 

 

In this simulation mode, a random sequence of signals is generated as a group. The number of signals of a group is randomly set for every group between diMinSignalsPerGroup and diMaxSignalsPerGroup. Within a group, a signal follows the preceding signal randomly, in a distance from lrMinDistance to lrMaxDistance. The first signal of a following group follows the last signal of the preceding group in a random distance between lrMinGroupDistance and lrMaxGroupDistance. An addition of statistical deviations is not avoided. Each signal is one program cycle long.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Disabled

29

The POU is disabled.

OK

Operation

21

The operation is being executed.

OK

WaitForStart

20

Waiting for starting command.

ControllerConditionInvalid

TimerInterfaceInvalid

18

The controller does not support the interface for the time functionalities.

InputParameterInvalid

ParameterInvalid

13

The parameter is invalid.

Disabled

Enumeration name:

Disabled

Enumeration value:

29

Description:

The POU is disabled.

The function block is disabled and executes no actions whatsoever. i_xEnable and q_xActive are set to FALSE

Operation

Enumeration name:

Operation

Enumeration value:

21

Description:

The operation is being executed.

The start signals are generated.

ParameterInvalid

Enumeration name:

ParameterInvalid

Enumeration value:

13

Description:

The parameter is invalid.

Issue

Cause

Solution

-

An invalid parameter was transferred.

Further information can be found at the q_sMsg output.

TimerInterfaceInvalid

Enumeration name:

TimerInterfaceInvalid

Enumeration value:

18

Description:

The controller does not support the interface for the time functionalities.

Issue

Cause

Solution

-

The controller does not support the required time functionalities.

The POU cannot be executed on this controller.

WaitForStart

Enumeration name:

WaitForStart

Enumeration value:

20

Description:

Waiting for starting command.

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