FB_HomeOnTP - General Information

Overview

Type:

Function block

Available as of:

V1.0.0.0

Inherits from:

-

Implements:

-

Versions:

Current version

Task

Reference run of a MultiBelt with Touchprobe signals. The module can process one or more signals per train.

Description

The module runs the trains past their homing sensors and registers the signals. If the correct number of signals is recognized, then the positions of the trains are reset to the value specified in iq_stMutliBelt.astTrain[x].lrHomeTPOffset. Now, the trains are moved to the specified station. After calling up the function block the train 1 stands in i_stParameter.uiStation and the rest of the trains are in the defined distance behind it. The motion parameters can be set via the respective inputs. If all trains have reached their end position, q_xHomeOk is set to TRUE. Then the module can be deactivated.

NOTE: If you use touchprobes of TM5 modules, you can capture either the rising edge or the falling edge, depending on the setting in ST_Station.xSensorEdge. The value of the ST_StationFeedback.lrLengthOfLastProduct variable remains 0 in this case.

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

FALSE -> TRUE: Reference run is started.

i_stParameter

ST_HomeOnTpParameter

Parameter structure to reference the MultiBelt network.

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 POU 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_xHomeOk

BOOL

TRUE: The reference run has been completed successfully.

Input/Output

Data type

Description

iq_stMultiBelt

ST_MultiBelt

Parameter structure of the MultiBelt network.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Disabled

0

The POU is disabled.

OK

WaitAllTrainsReady

1

Wait until all the trains are ready.

OK

WaitAllTrainsStopped

10

Wait until all the trains are stopped.

OK

WaitForCaptureOk

12

Wait for CaptureOk of the trains.

OK

WaitForHomeDone

16

Wait until the homing is completed.

OK

WaitForSortTrains

13

Wait until the trains are sorted.

OK

WaitForStart

2

Waiting for starting command.

OK

WaitForStartOff

11

Wait for the reset of the start.

ControllerConditionInvalid

SystemLibDiag

21

Diagnostic of the SystemLib

InputParameterInvalid

ControllerStopInterfaceInvalid

101

The ControllerStopInterface is invalid.

InputParameterInvalid

DriveLogAdrInvalid

26

The interface of the axis is invalid.

InputParameterInvalid

DriveNotSet

81

The axis has not been set.

InputParameterInvalid

HomeAccelerationRange

85

The acceleration for the homing is outside the valid range.

InputParameterInvalid

HomeDecelerationRange

86

The deceleration for the homing is outside the valid range.

InputParameterInvalid

HomeJerkRange

87

The jerk for the homing is outside the valid range.

InputParameterInvalid

HomeOffsetInvalid

30

The distance between two trains is invalid.

InputParameterInvalid

HomeTpNotSet

82

HomeTp has not been set.

InputParameterInvalid

HomeTPOffsetRange

29

HomeTPOffset is outside the valid range.

InputParameterInvalid

HomeVelocityRange

84

The velocity for the homing is outside the valid range.

InputParameterInvalid

LimitInterfaceInvalid

36

The interface Limit is invalid.

InputParameterInvalid

MaxTPSignalDistanceRange

89

MaxTPSignalDistance is outside the valid range.

InputParameterInvalid

MinTPSignalDistanceRange

90

MinTPSignalDistance is outside the valid range.

InputParameterInvalid

NumOfStationsRange

43

NumOfStations is outside the valid range.

InputParameterInvalid

RefActValuesInterfaceInvalid

80

The interface RefActValues is invalid.

InputParameterInvalid

SetLimitInterfaceInvalid

42

The interface SetLimit is invalid.

InputParameterInvalid

TpInterfaceInvalid

41

The interface of the Touchprobe is invalid.

InputParameterInvalid

TPSignalsPerTrainRange

88

TPSignalsPerTrain is outside the valid range.

InputParameterInvalid

TrainOrderInvalid

31

The sequence of the trains is invalid.

LimitReached

MaxTPSignalDistance

37

Excessive distance between two Touchprobe signals.

LimitReached

TpMissing

38

The Touchprobe cannot be found.

SercosConditionInvalid

SercosInterfaceInvalid

24

The Sercos interface is invalid.

UnexpectedProgramBehavior

UnknownState

25

Indeterminable state.

ControllerStopInterfaceInvalid

Enumeration name:

ControllerStopInterfaceInvalid

Enumeration value:

101

Description:

The ControllerStopInterface is invalid.

Issue

Cause

Solution

The ControllerStopInterface is invalid.

Incorrect drive type.

Select a correct drive type.

Disabled

Enumeration name:

Disabled

Enumeration value:

0

Description:

The POU is disabled.

Issue

Cause

Solution

The POU is disabled.

Status message - Function block is not activated.

The input i_xEnable is FALSE.

Set the input i_xEnable to TRUE.

DriveLogAdrInvalid

Enumeration name:

DriveLogAdrInvalid

Enumeration value:

26

Description:

The interface of the axis is invalid.

Issue

Cause

Solution

The drive interface is invalid.

stMultiBelt.astTrain[x].ifDrive.stLogAdr is not assigned or invalid value.

Assign or modify stMultiBelt.astTrain[x].ifDrive.stLogAdr.

DriveNotSet

Enumeration name:

DriveNotSet

Enumeration value:

81

Description:

The axis has not been set.

Issue

Cause

Solution

The drive interface is invalid.

The parameter stMultiBelt.astTrain[x].ifDrive is not assigned.

Assign the parameter stMultiBelt.astTrain[x].ifDrive.

HomeAccelerationRange

Enumeration name:

HomeAccelerationRange

Enumeration value:

85

Description:

The acceleration for the homing is outside the valid range.

Issue

Cause

Solution

The parameter stHomeOnTpParameter.stMove.lrAcc is invalid.

The parameter stHomeOnTpParameter.stMove.lrAcc is outside its value range.

The parameter stHomeOnTpParameter.stMove.lrAcc must be > Gc_lrMinAcceleration.

HomeDecelerationRange

Enumeration name:

HomeDecelerationRange

Enumeration value:

86

Description:

The deceleration for the homing is outside the valid range.

Issue

Cause

Solution

The parameter stHomeOnTpParameter.stMove.lrDec is invalid.

The parameter stHomeOnTpParameter.stMove.lrDec is outside its value range.

The parameter stHomeOnTpParameter.stMove.lrDec must be > Gc_lrMinAcceleration.

HomeJerkRange

Enumeration name:

HomeJerkRange

Enumeration value:

87

Description:

The jerk for the homing is outside the valid range.

Issue

Cause

Solution

The parameter stHomeOnTpParameter.stMove.lrJerk is invalid.

The parameter stHomeOnTpParameter.stMove.lrJerk is outside its value range.

The parameter stHomeOnTpParameter.stMove.lrJerk must be > Gc_lrMinJerk.

HomeOffsetInvalid

Enumeration name:

HomeOffsetInvalid

Enumeration value:

30

Description:

The distance between two trains is invalid.

Issue

Cause

Solution

The distance between two trains is invalid.

The distance between two trains is smaller than the train length.

The trains must be homed. The train positions are lost (retain variables) and must be set again.

HomeTpNotSet

Enumeration name:

HomeTpNotSet

Enumeration value:

82

Description:

HomeTp has not been set.

Issue

Cause

Solution

Touchprobe interface invalid.

The parameter stMultiBelt.astTrain[x].ifTpHome is not assigned.

Assign the parameter stMultiBelt.astTrain[x].ifTpHome.

HomeTPOffsetRange

Enumeration name:

HomeTPOffsetRange

Enumeration value:

29

Description:

HomeTPOffset is outside the valid range.

Issue

Cause

Solution

The parameter stMultiBelt.astTrain[x].lrHomeTPOffset is invalid.

The parameter stMultiBelt.astTrain[x].lrHomeTPOffset is outside its value range.

The value range of the parameter stMultiBelt.astTrain[x].lrHomeTPOffset goes from -stMultiBelt.stGeneral.lrBeltLength to stMultiBelt.stGeneral.lrBeltLength.

HomeVelocityRange

Enumeration name:

HomeVelocityRange

Enumeration value:

84

Description:

The velocity for the homing is outside the valid range.

Issue

Cause

Solution

The parameter stHomeOnTpParameter.stMove.lrVel is invalid.

The parameter stHomeOnTpParameter.stMove.lrVel is outside its value range.

The parameter stHomeOnTpParameter.stMove.lrVel must be > Gc_lrMinVelocity.

LimitInterfaceInvalid

Enumeration name:

LimitInterfaceInvalid

Enumeration value:

36

Description:

The interface Limit is invalid.

Issue

Cause

Solution

The interface Limit is invalid.

Incorrect drive type.

Select a correct drive type.

MaxTPSignalDistance

Enumeration name:

MaxTPSignalDistance

Enumeration value:

37

Description:

Excessive distance between two Touchprobe signals.

Issue

Cause

Solution

The distance of two Touchprobe signals is invalid.

The distance of two Touchprobe signals is too large.

Increase the parameter stHomeOnTpParameter.lrMaxTPSignalDistance.

Decrease the distance of the Touchprobe signals.

MaxTPSignalDistanceRange

Enumeration name:

MaxTPSignalDistanceRange

Enumeration value:

89

Description:

MaxTPSignalDistance is outside the valid range.

Issue

Cause

Solution

The parameter stHomeOnTpParameter.lrMaxTPSignalDistance is invalid.

The parameter stHomeOnTpParameter.lrMaxTPSignalDistance is outside its value range.

The parameter stHomeOnTpParameter.lrMaxTPSignalDistance must be > 0.

MinTPSignalDistanceRange

Enumeration name:

MinTPSignalDistanceRange

Enumeration value:

90

Description:

MinTPSignalDistance is outside the valid range.

Issue

Cause

Solution

The parameter stHomeOnTpParameter.lrMinTPSignalDistance is invalid.

The parameter stHomeOnTpParameter.lrMinTPSignalDistance is outside its value range.

The parameter stHomeOnTpParameter.lrMinTPSignalDistance must be >= 0.

NumOfStationsRange

Enumeration name:

NumOfStationsRange

Enumeration value:

43

Description:

NumOfStations is outside the valid range.

Issue

Cause

Solution

The parameter stMultiBelt.stGeneral.uiNumOfStations is invalid.

The parameter stMultiBelt.stGeneral.uiNumOfStations is outside its value range.

The parameter stMultiBelt.stGeneral.uiNumOfStations must be in the range from 1 to Gc_uiMaxNumberOfStations.

RefActValuesInterfaceInvalid

Enumeration name:

RefActValuesInterfaceInvalid

Enumeration value:

80

Description:

The interface RefActValues is invalid.

Issue

Cause

Solution

The interface RefActValues is invalid.

Incorrect drive type.

Select a correct drive type.

SercosInterfaceInvalid

Enumeration name:

SercosInterfaceInvalid

Enumeration value:

24

Description:

The Sercos interface is invalid.

Issue

Cause

Solution

The global Sercos interface is invalid.

Incorrect drive bus or controller.

Modify the drive bus or the controller.

SetLimitInterfaceInvalid

Enumeration name:

SetLimitInterfaceInvalid

Enumeration value:

42

Description:

The interface SetLimit is invalid.

Issue

Cause

Solution

The interface SetLimit is invalid.

Incorrect drive type.

Select a correct drive type.

SystemLibDiag

Enumeration name:

SystemLibDiag

Enumeration value:

21

Description:

Diagnostic of the SystemLib

Issue

Cause

Solution

Diagnostic of the SystemLib

Diagnostic message from a System library.

See q_sMsg for more details.

TpInterfaceInvalid

Enumeration name:

TpInterfaceInvalid

Enumeration value:

41

Description:

The interface of the Touchprobe is invalid.

Issue

Cause

Solution

The interface of the Touchprobe is invalid.

Incorrect Touchprobe type.

Modify the Touchprobe type.

TpMissing

Enumeration name:

TpMissing

Enumeration value:

38

Description:

The Touchprobe cannot be found.

Issue

Cause

Solution

The Touchprobe cannot be found.

No Touchprobe signal is detected.

A Touchprobe signal is expected within the route stMultiBelt.stGeneral.lrBeltLength.

TPSignalsPerTrainRange

Enumeration name:

TPSignalsPerTrainRange

Enumeration value:

88

Description:

TPSignalsPerTrain is outside the valid range.

Issue

Cause

Solution

The parameter stHomeOnTpParameter.uiTPSignalsPerTrain is invalid.

The parameter stHomeOnTpParameter.uiTPSignalsPerTrain is outside its value range.

The parameter stHomeOnTpParameter.uiTPSignalsPerTrain must be >= 1.

TrainOrderInvalid

Enumeration name:

TrainOrderInvalid

Enumeration value:

31

Description:

The sequence of the trains is invalid.

Issue

Cause

Solution

The sequence of the trains is incorrect.

The trains must be positioned one after the other.

The trains must be homed.

UnknownState

Enumeration name:

UnknownState

Enumeration value:

25

Description:

Indeterminable state.

Issue

Cause

Solution

Indeterminable state.

An invalid state occurred during the program processing.

Contact your local Schneider Electric service representative.

WaitAllTrainsReady

Enumeration name:

WaitAllTrainsReady

Enumeration value:

1

Description:

Wait until all the trains are ready.

Issue

Cause

Solution

Wait until all the trains are ready.

Status message - When activating, the function block waits until all the trains (axes) are in position control.

The axes have to be activated externally.

There must be no errors pending.

WaitAllTrainsStopped

Enumeration name:

WaitAllTrainsStopped

Enumeration value:

10

Description:

Wait until all the trains are stopped.

Issue

Cause

Solution

Wait until all the trains are stopped.

Status message - Stop when deactivating the function block.

Input i_xEnable = FALSE.

Set input i_xEnable to TRUE.

WaitForCaptureOk

Enumeration name:

WaitForCaptureOk

Enumeration value:

12

Description:

Wait for CaptureOk of the trains.

Status message - Wait for the Touchprobe signal.

WaitForHomeDone

Enumeration name:

WaitForHomeDone

Enumeration value:

16

Description:

Wait until the homing is completed.

Status message - Wait until the homing is completed.

WaitForSortTrains

Enumeration name:

WaitForSortTrains

Enumeration value:

13

Description:

Wait until the trains are sorted.

Status message - Internal state.

WaitForStart

Enumeration name:

WaitForStart

Enumeration value:

2

Description:

Waiting for starting command.

Issue

Cause

Solution

Waiting for starting command.

Status message - The function block waits for start.

The input i_xStart is FALSE.

Set the input i_xStart to TRUE.

WaitForStartOff

Enumeration name:

WaitForStartOff

Enumeration value:

11

Description:

Wait for the reset of the start.

Issue

Cause

Solution

Wait for the reset of the start.

Status message - Wait for i_xStart = FALSE.

Set the input i_xStart to FALSE.