FB_TeachingLinearMotionSystem - GetSample (Method)

Overview

Type:

Method

Available as of:

V1.8.0.0

This chapter provides information on:

Task

Gets a previously stored sample.

Description

With the method GetSample(...), a previously stored sample at the selected set and sample index is returned.

Access: PUBLIC

Interface

Input

Data type

Description

i_udiSetIndex

UDINT

Index of the set where the sample is stored.

i_udiSampleIndex

UDINT

Index of the sample within the selected 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]

Provides additional information about the current status of the POU.

Return Value

Data type

Description

SE_MATH.ST_Vector3D

TCP position stored at the selected set and sample indices.

Diagnostic Messages

q_xError

q_etResult

Enumeration value of q_etResult

Description

FALSE

Ok

0

Ok

TRUE

SamplesIndexInvalid

44

The provided index does not refer to a valid sample.

TRUE

SetIndexInvalid

45

The provided index does not refer to a valid set.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

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

SamplesIndexInvalid

Enumeration name:

SamplesIndexInvalid

Enumeration value:

44

Description:

The provided index does not refer to a valid sample.

Issue

Cause

Solution

Not possible to get a stored sample.

The provided sample index is either zero or greater than udiNumberOfSamplesPerSet.

Provide a sample index in the range [1... udiNumberOfSamplesPerSet]

The provided sample index is not stored yet.

Provide an index referring to an already stored sample.

SetIndexInvalid

Enumeration name:

SetIndexInvalid

Enumeration value:

45

Description:

The provided index does not refer to a valid set.

Issue

Cause

Solution

Not possible to add a new sample.

The provided set index is either zero or greater than udiActiveSetIndex.

Provide a set index in the range [1...udiActiveSetIndex]