FB_SphereSetCenterRadius (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

This chapter provides information on:

Task

Set the center and the radius of the Sphere collision object.

Description

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

The following figure represents i_stCenter and i_lrRadius parameters of a Sphere object:

Interface

The function block implements the interface IF_Sphere.

Access: PUBLIC

Input

Data type

Description

i_stCenter

SE_Math.ST_Vector3D

The center of the Sphere object.

i_lrRadius

LREAL

Radius of the Sphere 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

RadiusRange

5

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

OK

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

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 center and radius.

The provided radius i_lrRadius has a negative or zero value.

Verify that i_lrRadius > 0.0.