FB_TeachingCartesianPose - 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 consists of a TCP position and a target position, and both positions must refer to the same point in space.

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 distance between each new TCP position and target position and the respective previous samples must be consistent; this is verified using the value of i_lrSampleTolerance.
NOTE: The order used to acquire the samples within the first set must be applied to all the other sets.
NOTE: The active set and the number of samples already stored inside this set can be read using the properties udiActiveSetIndex and udiNumberOfSamplesInActiveSet.

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.

i_stTargetPosition

SE_MATH.ST_Vector3D

Cartesian position referred to the target coordinate system.

i_lrSampleTolerance

LREAL

Tolerance value used to verify the consistency of the samples.

The algorithm verifies that the distance between the previous and the new sample of the TCP position compared to the distance between the previous and new target position samples is within this tolerance value.

Default value: 1.0 mm

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.

TRUE

SampleToleranceExceeded

43

The last set of provided samples exceeds the sample tolerance value.

TRUE

SampleToleranceRange

42

The provided value for the sample tolerance is out of range.

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 is 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.

SampleToleranceExceeded

Enumeration name:

SampleToleranceExceeded

Enumeration value:

43

Description:

The last set of provided samples exceeds the sample tolerance value.

Issue

Cause

Solution

Not possible to add a new sample.

The distance between the previous and the new TCP position compared with the distance between the previous and new target position is exceeding the value of i_lrSampleTolerance.

Verify the accuracy of the sampling procedure or increase the value of i_lrSampleTolerance.

SampleToleranceRange

Enumeration name:

SampleToleranceRange

Enumeration value:

42

Description:

The last set of provided samples exceeds the sample tolerance value.

Issue

Cause

Solution

Not possible to add a new sample.

The value of i_lrSampleTolerance is either zero or negative.

Verify that i_lrSampleTolerance >0.0.