FC_CalculatePointOnCircle2D

 

FC_CalculatePointOnCircle2D - General Information

Overview

Type:

Function

Available as of:

V1.0.3.0

Versions:

Current version

Task

Calculates a point on a given circle which has a specified direction angle.

Description

This function calculates the coordinates of the point on the circumference of the circle i_stCircle, which has the direction angle i_lrAngle. The direction angle is measured anti-clockwise in degrees. 0° corresponds to the positive X direction (see graphics below).

G-SE-0068443.1.gif-high.gif

 

 

Interface

Input

Data type

Description

i_stCircle

ST_Circle2D

Circle on whose circumference is located the point to be calculated.

i_lrAngle

LREAL

Direction angle of the point (in degrees, anti-clockwise in relation to the positive X direction)

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 an 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

Return Value

Data type

Description

ST_Vector2D

Point on the circumference of the circle

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

RadiusRangeCircle

26

The radius of the circle is outside the valid range.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The intersections have been calculated successfully.

RadiusRangeCircle

Enumeration name:

RadiusRangeCircle

Enumeration value:

26

Description:

The radius of the circle is outside the valid range.

Issue

Cause

Solution

-

 At the input i_stCircle.lrRadius, a number <= 0 has been transferred.

The radius of the circle must be greater than zero.