IF_TargetsHandler - AddTargetFromTargetWithSlots (Method)

Overview

Type:

Method

Available as of:

V1.4.1.0

This chapter provides information on:

Task

Adds a new target to the list starting from the information contained in an ST_RobotTargetWithSlots structure.

Description

The method AddTargetFromTargetWithSlots adds a target to the list handled by the function block starting from the information contained in an ST_RobotTargetWithSlots structure.

Interface

Input

Data type

Description

i_stPose

ST_CartesianPose

The Cartesian pose of the target when it was first detected in the system (for example, the pose returned by a vision system).

i_lrEncoderPosition

LREAL

The position of the encoder linked to the targets handler when the target was first detected by the system.

stRobotTargetWithSlots

ST_RobotTargetWithSlots

A structure containing the information of a robot target containing slots.

The initial pose, the present pose, and the initial encoder position are the only informations that are updated accordingly with the inputs i_stPose and i_lrEncoderPosition.

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_udiListIndex

UDINT

Index of the container target created by the targets handler.

q_udiUnivocalId

UDINT

Unique identifier linked to the container target.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

Ok

Ok

0

Ok

ExecutionAborted

MaxNumberOfTargetsExceeded

108

The list already contains the maximum number of targets.

ExecutionAborted

NotConfigured

101

The function block is not configured yet.

ExecutionAborted

NumberOfSlotsInvalid

117

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

ExecutionAborted

UnexpectedFeedback

4

Internal error detected.

ExecutionAborted

UpdateTargetsActive

109

An update of the target handler targets is running and some method cannot be called.

InputParameterInvalid

NumberOfSlotsValue

116

The number of slots provided does not match the configured number of slots of the targets handler.

InputParameterInvalid

OrientationConventionInvalid

38

Invalid orientation convention.

InputParameterInvalid

RobotIdInvalid

120

A provided robot ID has an invalid value.

InputParameterInvalid

SlotIndexValue

114

The index of a slot is not correct.

InputParameterInvalid

UnivocalIdInvalid

110

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

MaxNumberOfTargetsExceeded

Enumeration name:

MaxNumberOfTargetsExceeded

Enumeration value:

108

Description:

The list already contains the maximum number of targets.

Issue

Cause

Solution

The target has not been added to the targets handler.

The maximum number (Gc_udiMaxNumberOfTargets) of targets has been reached. It is not possible to add new targets.

Remove the targets from the list once they have been processed by the system.

NotConfigured

Enumeration name:

NotConfigured

Enumeration value:

101

Description:

The function block is not configured yet.

Issue

Cause

Solution

The target has not been added to the targets handler.

The Configuration method has not been called yet.

Ensure that the Configuration method has been successful 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 target has not been added to the targets handler.

It is not possible to add a new target to the targets handler while the number of configured slots is zero.

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

  • To add a target without slots, call AddTargetFromTarget.

NumberOfSlotsValue

Enumeration name:

NumberOfSlotsValue

Enumeration value:

116

Description:

The number of slots provided does not match the configured number of slots of the targets handler.

Issue

Cause

Solution

The target has not been added to the targets handler.

The number of slots described inside i_stRobotTargetWithSlots does not match the number of slots configured inside the function block.

Verify that the number of slots is correct.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

Status Message: The target has been successfully added to the targets handler.

OrientationConventionInvalid

Enumeration name:

OrientationConventionInvalid

Enumeration value:

38

Description:

Invalid orientation convention.

Issue

Causes

Solution

The target has not been added to the targets handler.

The input value of i_stPose.etOrientationConvention is invalid.

Provide one of the permissible values of ROB.ET_OrientationConvention.

Refer to Robotic Library - ET_OrientationConvention.

The orientation convention of the relative pose of one of the listed slots is invalid.

RobotIdInvalid

Enumeration name:

RobotIdInvalid

Enumeration value:

120

Description:

A provided robot ID has an invalid value.

Issue

Causes

Solution

The target has not been added to the targets handler.

The input i_stRobotTargetWithSlots does not contain a valid robot ID.

Verify that the robot identifier value is either within the range [ET_SystemEntity.Robot1...ET_SystemEntity.Robot10] or is equal to ET_SystemEntity.None.

The robot identifier of one of the listed slots is invalid.

SlotIndexValue

Enumeration name:

SlotIndexValue

Enumeration value:

114

Description:

The index of a slot is not correct.

Issue

Cause

Solution

The target has not been added to the targets handler.

The index of one slot does not match the index in the list.

Verify that each slot contains an index reflecting its index in the list.

UnexpectedFeedback

Enumeration name:

UnexpectedFeedback

Enumeration value:

4

Description:

Internal error detected.

Adding a new target to the list was unsuccessful.

UnivocalIdInvalid

Enumeration name:

UnivocalIdInvalid

Enumeration value:

110

Description:

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

Issue

Causes

Solution

The target has not been added to the targets handler.

The input i_stRobotTargetWithSlots does not contain a valid identifier.

Verify that the identifier value is greater than zero.

The identifier of one of the listed slots is invalid.

UpdateTargetsActive

Enumeration name:

UpdateTargetsActive

Enumeration value:

109

Description:

An update of the target handler targets is running and some method cannot be called.

Issue

Cause

Solution

The target has not been added to the targets handler.

It is not possible to add a new target to the targets handler while the UpdateTargets method is running.

Ensure that the UpdateTargets method is not running before calling this method.