IF_TargetsHandler - EvaluateTargetSlotIndex (Method)

Overview

Type:

Method

Available as of:

V1.4.1.0

This chapter provides information on:

Task

Evaluates the slot index linked to a target provided as input.

Description

The method EvaluateTargetSlotIndex allows you to evaluate the slot index linked to a target provided as input. The evaluation of the index is based on the list index and the unique identifier of the target provided as input.

If an ST_RobotTarget structure is associated to a slot, the method can be used to reconstruct the specific slot index from which such target was generated, as this information is not part of the ST_RobotTarget structure itself.

Interface

Input

Data type

Description

i_stRobotTarget

ST_RobotTarget

The robot target for which it is required to evaluate a slot index.

Output

Data type

Description

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 = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

q_sMsg

STRING[80]

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

q_udiContainerUnivocalId

UDINT

Unique identifier of the target containing the target provided as input.

For example, this could be the identifier of a box containing a list of place positions, including the robot target provided as input.

Return Value

Data type

Description

UINT

The index of the slot related to the target provided as input. If the target refers to a target containing slots, the returned slot index is zero.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

Ok

Ok

0

Ok

Ok

ContainerTargetId

121

A provided target ID refers to a container target.

ExecutionAborted

NotConfigured

101

The function block is not configured yet.

ExecutionAborted

NumberOfSlotsInvalid

117

The configured number of slots is invalid for a called method.

InputParameterInvalid

ListIndexInvalid

112

The provided list index is not referring to a valid target in the list.

InputParameterInvalid

ListIndexRange

111

The provided index is either zero or greater than the maximum list size.

InputParameterInvalid

UnivocalIdInvalid

110

The identifier is invalid (a zero value is not allowed).

ContainerTargetId

Enumeration name:

ContainerTargetId

Enumeration value:

121

Description:

A provided target ID refers to a container target.

Issue

Cause

Solution

A null index has been returned.

The input target refers to a container target.

Ensure that the input target refers to a slot.

ListIndexInvalid

Enumeration name:

ListIndexInvalid

Enumeration value:

112

Description:

The provided list index is not referring to a valid target in the list.

Issue

Cause

Solution

The index has not been returned.

The targets handler does not contain a target with the provided index.

Ensure that a target with index i_stRobotTarget.udiListIndex is contained.

ListIndexRange

Enumeration name:

ListIndexRange

Enumeration value:

111

Description:

The provided index is either zero or greater than the maximum list size.

Issue

Cause

Solution

The index has not been returned.

The value of the index is out of range.

The value of the index i_stRobotTarget.udiListIndex must be within the range [1...Gc_udiMaxNumberOfTargets].

NotConfigured

Enumeration name:

NotConfigured

Enumeration value:

101

Description:

The function block is not configured yet.

Issue

Cause

Solution

The index has not been returned.

The Configuration method has not been called yet.

Ensure that the Configuration method has been successfully called before calling this method.

NumberOfSlotsInvalid

Enumeration name:

NumberOfSlotsInvalid

Enumeration value:

117

Description:

The configured number of slots is invalid for a called method.

Issue

Cause

Solution

The index has not been returned.

It is not possible to evaluate the slot index if the number of configured slots is zero.

  • Ensure that the number of configured slots is greater than zero before calling this method.

  • To set the number of configured slots, call the method ConfigureSlotList.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

Status Message: The index has been successfully returned.

UnivocalIdInvalid

Enumeration name:

UnivocalIdInvalid

Enumeration value:

110

Description:

The identifier is invalid (a zero value is not allowed).

Issue

Cause

Solution

The index has not been returned.

The input i_stRobotTarget contains an invalid ID.

Ensure that the input i_stRobotTarget.udiUnivocalId refers to a valid target in the list.