FB_TeachingOrientation - AddSample (Method)

Overview

Type:

Method

Available as of:

V1.8.0.0

This chapter provides information on:

Task

Adds a new sample to the active set.

Description

With the method AddSample(...), a new sample is added to the active set. Each sample contains the TCP position at a specific target point with reference to the coordinate system of the robot.

NOTE: Before adding the first sample, ensure that the method SetNumberOfSamplesPerSet is called successfully to configure the number of samples that must be acquired for each set.
NOTE: The sets are assumed to be displaced along the X coordinate of the orientation to estimate and they must be arranged so that the X coordinates across the sets are monotonously increasing or decreasing.
NOTE: The order used to acquire the samples within the first set must be applied to all the other sets. The active set and the number of samples already stored inside such a set can be read using the properties udiActiveSetIndex and udiNumberOfSamplesInActiveSet.

The following graphic displays an example of the sampling order of the points. In this case, two samples per set are acquired across four different sets, for a total of eight samples.

Access: PUBLIC

Interface

Input

Data type

Description

i_stTCPPosition

SE_MATH.ST_Vector3D

Cartesian position of the TCP referred to the coordinate system of the robot.

Output

Data type

Description

q_xError

BOOL

TRUE: An error occurred during last command. For more information refer also to q_etResult and q_sResultMsg.

q_etResult

ET_Result

Provides diagnostic and status information.

If q_xError = FALSE, then q_etResult provides status information.

If q_xError = TRUE, then q_etResult provides diagnostic/error information.

The enumeration ET_Result contains the possible values of the POU operation results.

q_sResultMsg

STRING[80]

Provides additional information about the current status of the POU.

Diagnostic Messages

q_xError

q_etResult

Enumeration value of q_etResult

Description

FALSE

Ok

0

Success.

TRUE

NumberOfSamplesPerSetNotConfigured

36

The number of samples per set is not configured.

TRUE

MaxNumberOfSetsReached

35

The maximum number of sets is already sampled.

NumberOfSamplesPerSetNotConfigured

Enumeration name:

NumberOfSamplesPerSetNotConfigured

Enumeration value:

36

Description:

The number of samples per set is not configured.

Issue

Cause

Solution

Not possible to add a new sample.

The number of samples per set is not configured.

Ensure that the method SetNumberOfSamplesPerSet is called successfully before calling this method.

MaxNumberOfSetsReached

Enumeration name:

MaxNumberOfSetsReached

Enumeration value:

35

Description:

The maximum number of sets is already sampled.

Issue

Cause

Solution

Not possible to add a new sample.

The maximum number of sets are already sampled.

Call the RemoveAllSamples method to remove all the stored samples and start a new sampling.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Success.

Status message: Adding a new sample to the active set was successful.