FB_EllipticSpline - CalcFullSplineUserApex (Method)

Overview

Type:

Method

Available as of:

V1.4.1.0

This chapter provides information on:

oTask

oDescription

oInterface

oDiagnostic Messages

Task

Calculating spline points for an elliptic spline.

Description

Based on the inputs i_stStart, i_stTarget, i_lrAbsHeight, i_lrScalingFactor and on the value of the property udiNumberOfSplinePoints, this method calculates a position table for a spline interpolation in three-dimensional space. Traveling along these positions can be realized by using the IF_RobotMotion.MoveS motion command. A position table is calculated from the start position to the target position as well as from the target position to the start position. For this purpose, two ellipse-shaped half branches are calculated: from the start position to the apex and from the apex to the target position. The apex of the two half branches of the elliptic spline can be manipulated by the input i_lrScalingFactor.

Full spline from start position to target position: i_lrScalingFactor := -0.75

G-SE-0064054.1.gif-high.gif

 

 

Full spline from start position to target position: i_lrScalingFactor := 0.5

G-SE-0064055.1.gif-high.gif

 

 

Interface

Input

Data type

Description

i_stStart

PDL.ST_Vector3D

Start position in cartesian coordinates

Value range: i_stStart.lrX / lrY <> i_stTarget.lrX / lrY

i_stTarget

PDL.ST_Vector3D

Target position in cartesian coordinates

Value range: i_stStart.lrX / lrY <> i_stTarget.lrX / lrY

i_lrAbsHeight

LREAL

Absolute height of the elliptic spline apex.

Value range: i_lrAbsHeight > i_stStart.lrZ AND i_lrAbsHeight > i_stTarget.lrZ

i_lrScalingFactor

LREAL

A value not equal to 0.0 moves the apex of the elliptic spline either towards the start position or towards the target position, where 0 defines the center position between the start position and the target position. A positive value moves it towards the target position, a negative value towards the start position.

Value range: -1.0 < i_lrScalingFactor < 1.0

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal 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.

q_stForward

ST_SplineTable

Calculated spline table from start to end position.

q_stReverse

ST_SplineTable

Calculated spline table from end to start position.

q_udiApexIndex

UDINT

Index of the spline point representing the apex of the elliptic spline.

q_lrSplineLength

LREAL

Resulting length of linear connections between the spline points of the elliptic spline.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

IdenticalPosition

163

The positions are identical.

InputParameterInvalid

NumberOfSplinePointsRange

89

The number of spline points is out of range.

InputParameterInvalid

ScalingFactorRange

162

The scaling factor is out of range.

InputParameterInvalid

StartInvalid

164

The start position is invalid.

InputParameterInvalid

TargetInvalid

91

The target is invalid.

IdenticalPosition

Enumeration name:

IdenticalPosition

Enumeration value:

163

Description:

The positions are identical.

Issue

Cause

Solution

Calculating the elliptic spline was not successful.

The cartesian components X and Y of the start position (i_stStart) and of the target position (i_stTarget) are identical in a range of 0.001.

Ensure that both values are not identical to each other.

NumberOfSplinePointsRange

Enumeration name:

NumberOfSplinePointsRange

Enumeration value:

89

Description:

The number of spline points is out of range.

Issue

Cause

Solution

Calculating the elliptic spline was not successful.

The value transferred at the property udiNumberOfSplinePoints lies outside the valid range.

Ensure that udiNumberOfSplinePoints is greater than or equal to 3.

Ensure that udiNumberOfSplinePoints is less than or equal to 98.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

Calculating the elliptic spline was successful.

ScalingFactorRange

Enumeration name:

ScalingFactorRange

Enumeration value:

162

Description:

The scaling factor is out of range.

Issue

Cause

Solution

Calculating the elliptic spline was not successful.

The value transferred at the input i_lrScalingFactor lies outside the valid range.

At the input i_lrScalingFactor, a value greater than -1.0 must be transferred.

At the input i_lrScalingFactor, a value less than 1.0 must be transferred.

StartInvalid

Enumeration name:

StartInvalid

Enumeration value:

164

Description:

The start position is invalid.

Issue

Cause

Solution

Calculating the elliptic spline was not successful.

The method SetWorkingPlane was called and the working plane XY is configured.

Ensure that the input i_stStart.lrZ is set to 0.

The method SetWorkingPlane was called and the working plane XZ is configured.

Ensure that the input i_stStart.lrY is set to 0.

The method SetWorkingPlane was called and the working plane YZ is configured.

Ensure that the input i_stStart.lrX is set to 0.

The value of the input i_lrScalingFactor is not equal to 0.0 and the value of the input i_stStart.lrZ is greater than the value of the input i_lrAbsHeight.

Ensure that the input i_stStart.lrZ is not greater than or equal to the input i_lrAbsHeight.

TargetInvalid

Enumeration name:

TargetInvalid

Enumeration value:

91

Description:

The target is invalid.

Issue

Cause

Solution

Calculating the elliptic spline was not successful.

The method SetWorkingPlane was called and the working plane XY is configured.

Ensure that the input i_stTarget.lrZ is set to 0.

The method SetWorkingPlane was called and the working plane XZ is configured.

Ensure that the input i_stTarget.lrY is set to 0.

The method SetWorkingPlane was called and the working plane YZ is configured.

Ensure that the input i_stTarget.lrX is set to 0.

The value of the input i_lrScalingFactor is not equal to 0.0 and the value of the input i_stTarget.lrZ is greater than the value of the input i_lrAbsHeight.

Ensure that the input i_stTarget.lrZ is not greater than or equal to the input i_lrAbsHeight.