FB_Capsule - SetPointsRadius (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

This chapter provides information on:

Task

Sets points and radius of the capsule.

Description

Given two points and a radius, this method initializes the Capsule object.

The method can be called multiple times to reconfigure the object.

The following figure represents i_stPointA, i_stPointB and i_lrRadius parameters of a Capsule object:

Interface

The function block implements the interface IF_Capsule.

Access: PUBLIC

Input

Data type

Description

i_stPointA

SE_Math.ST_Vector3D

Point A Capsule object.

i_stPointB

SE_Math.ST_Vector3D

Point B Capsule object.

i_lrRadius

LREAL

Radius of the Capsule object.

Output

Data type

Description

q_xError

BOOL

The output is set to TRUE if an error has been detected during the execution.

q_etResult

ET_Result

POU-specific output on the diagnostic; q_xError = FALSE -> Status message; q_xError = TRUE -> Diagnostic message.

q_sResultMsg

STRING(80)

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

Diagnostic Messages

q_xError

q_etResult

Enumeration value

Description

FALSE

OK

0

Success

TRUE

PointsIdentical

7

The provided points are identical.

TRUE

RadiusRange

5

The provided value for the radius is outside the admissible range.

OK

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

PointsIdentical

Enumeration name:

PointsIdentical

Enumeration value:

7

Description:

The provided points are identical.

Issue

Cause

Solution

Could not set points and radius.

i_stPointA and i_stPointB represent the same point.

Verify that i_stPointA is not equal to i_stPointB.

RadiusRange

Enumeration name:

RadiusRange

Enumeration value:

5

Description:

The provided value for the radius is outside the admissible range.

Issue

Cause

Solution

Could not set points and radius.

The provided radius i_lrRadius has a negative or zero value.

Verify that i_lrRadius > 0.0.