FB_TeachingCartesianPose - SetNumberOfSamplesPerSet (Method)

Overview

Type:

Method

Available as of:

V1.8.0.0

This chapter provides information on:

Task

Sets how many samples must be stored inside a set.

Description

With the method SetNumberOfSamplesPerSet(...), each set of samples with a predefined number of samples is configured. Each set must contain at least two samples, so this is the minimum value that can be set.

NOTE: After a successful call of this method, the function block expects a number of AddSample calls per set that corresponds to the configured number of samples per set. When the required number of samples is added for the active set, the function block automatically selects a new set.
NOTE: When this method is called, the saved samples are removed.

Access: PUBLIC

Interface

Input

Data type

Description

i_udiValue

UDINT

Number of samples per set.

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]

Event-triggered message that gives more detailed information on the diagnostic state.

Diagnostic Messages

q_xError

q_etResult

Enumeration value of q_etResult

Description

FALSE

Ok

0

Success.

TRUE

NumberOfSamplesInvalid

40

Not enough samples to evaluate a cartesian pose.

TRUE

SamplesAlreadyAdded

47

One or more samples are already added.

NumberOfSamplesInvalid

Enumeration name:

NumberOfSamplesInvalid

Enumeration value:

40

Description:

Not enough samples to evaluate a cartesian pose.

Issue

Cause

Solution

Not possible to set the number of samples for the set.

A value i_udiValue < 2 was provided.

Verify that i_udiValue >= 2.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Success.

Status message: Removing the stored samples was successful.

SamplesAlreadyAdded

Enumeration name:

SamplesAlreadyAdded

Enumeration value:

47

Description:

One or more samples are already added.

Issue

Cause

Solution

Not possible to set the number of samples for the set.

One or more samples are already added.

Call the RemoveAllSamples method to clean the samples before calling the method SetNumberOfSamplesPerSet.