IF_TargetsHandler - AddTargetFromTarget (Method)

Overview

Type:

Method

Available as of:

V1.4.1.0

This chapter provides information on:

Task

Adds a target to the list taking into account the information of an existing target.

Description

The method AddTargetFromTarget adds a target to the list handled by the function block taking into account the information of an existing target. Also refer to the description of the use case.

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.

i_stRobotTarget

ST_RobotTarget

A robot target structure containing information on an existing target.

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 target inside the targets handler.

q_udiUnivocalId

UDINT

Unique identifier linked to the 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

UpdateTargetsActive

109

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

ExecutionAborted

UnexpectedFeedback

4

Internal error detected.

InputParameterInvalid

OrientationConventionInvalid

38

Invalid orientation convention.

InputParameterInvalid

RobotIdInvalid

120

A provided robot ID has an invalid value.

InputParameterInvalid

UnivocalIdInvalid

110

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

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

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

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 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 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 greater than zero.

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

  • To add a target with slots, call AddTargetFromTargetWithSlots.

OrientationConventionInvalid

Enumeration name:

OrientationConventionInvalid

Enumeration value:

38

Description:

Invalid orientation convention.

Issue

Cause

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.

RobotIdInvalid

Enumeration name:

RobotIdInvalid

Enumeration value:

120

Description:

A provided robot ID has an invalid value.

Issue

Cause

Solution

The target has not been added to the targets handler.

The input i_stRobotTarget 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.

UnexpectedFeedback

Enumeration name:

UnexpectedFeedback

Enumeration value:

4

Description:

Internal error detected.

Adding a 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

Cause

Solution

The target has not been added to the targets handler.

The input i_stRobotTarget does not contain a valid identifier.

Verify that the identifier value is greater than zero.

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.