FB_EntitiesHandler - AddTargetGenerator (Method)

Overview

Type:

Method

Available as of:

V1.6.0.0

This chapter provides information on:

Task

Add a new target generator.

Description

The method AddTargetGenerator adds a new target generator entity to the function block.

Interface

Input

Data type

Description

i_stData

ST_TrackingSystemData

Structure containing the data on the target generator to add.

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic. A value unequal to 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 additional information on the diagnostic state.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value of q_etDiagExt

Description

Ok

Ok

0

Ok

ExecutionAborted

MaxNumberOfTargetGeneratorExceeded

170

The maximum number of configurable target generators is reached.

InputParameterInvalid

TargetGeneratorIdInvalid

171

A provided target generator ID is invalid.

InputParameterInvalid

TargetGeneratorIdDuplicated

172

A target generator entity already exists with the same ID.

InputParameterInvalid

OrientationConventionInvalid

38

Invalid orientation convention.

InputParameterInvalid

TargetGeneratorNameInvalid

173

The name assigned to a target generator entity is invalid.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

MaxNumberOfTargetGeneratorExceeded

Enumeration name:

MaxNumberOfTargetGeneratorExceeded

Enumeration value:

170

Description:

The maximum number of configurable target generators is reached.

Issue

Cause

Solution

A target generator has not been added to the list.

It is not possible to add a new target generator since the maximum number of target generators has been reached.

Ensure not to add more than SERT.Gc_udiMaxNumberOfTargetGenerators target generators to the function block.

TargetGeneratorIdInvalid

Enumeration name:

TargetGeneratorIdInvalid

Enumeration value:

171

Description:

A provided target generator ID is invalid.

Issue

Cause

Solution

A target generator has not been added to the list.

i_stData.etSystemId contains an invalid value.

Ensure that the tracking system ID is in the range ET_SystemEntity.TargetGenerator1...ET_SystemEntity.TargetGenerator30.

TargetGeneratorIdDuplicated

Enumeration name:

TargetGeneratorIdDuplicated

Enumeration value:

172

Description:

A target generator entity already exists with the same ID.

Issue

Cause

Solution

A target generator has not been added to the list.

The function block already contains a target generator with the same ID.

Ensure that every ID assigned to the target generators is unique.

OrientationConventionInvalid

Enumeration name:

OrientationConventionInvalid

Enumeration value:

38

Description:

Invalid orientation convention.

Issue

Cause

Solution

A target generator has not been added to the list.

i_stData.stBasePose.etOrientationConvention contains an invalid orientation convention value.

Ensure that the orientation convention has one of the following values:

  • ROB.ET_OrientationConvention.XYZ

  • ROB.ET_OrientationConvention.ZYX

TargetGeneratorNameInvalid

Enumeration name:

TargetGeneratorNameInvalid

Enumeration value:

173

Description:

The name assigned to a target generator entity is invalid.

Issue

Cause

Solution

A target generator has not been added to the list.

i_stData.sName contains an empty string or a target generator with the same string has already been assigned.

  • Ensure that the name of the target generator is not an empty string.

  • Ensure that the name of the target generator is unique.