Mitsubishi Electric CR750-Q Instruction Manual page 424

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

4MELFA-BASIC V
CalArc
[Function]
Provides information regarding the arc that contains the three specified points.
[Format]
<Numeric Variable 4> = CalArc(<Position 1>, <Position 2>, <Position 3>,
[Terminology]
<Position 1>
<Position 2>
<Position 3>
<Numeric Variable 1>
<Numeric Variable 2>
<Numeric Variable 3>
<Position Variables 1>
<Numeric Variable 4>
[Reference Program]
1 M1=CalArc(P1,P2,P3,M10,M20,M30,P10)
2 If M1<>1 Then End
3 MR=M10
4 MRD=M20
5 MARCLEN=M30
6 PC=P10
[Explanation]
(1) Provides information regarding the arc that is determined by the three specified points, position 1, posi-
tion 2 and position 3.
(2) If the arc generation and calculation of various values succeeded, 1 will be returned as the return value.
(3) If some points have the exact same position or if all three points are on a straight line, -1 will be returned
as the return value. In such cases, the distance between the starting point and the endpoint will be
returned as the arc length, -1 as the radius, 0 as the central angle, and (0, 0, 0) as the center point.
(4) If circular arc generation fails, -2 will be returned as the return value. If a circular arc cannot be gener-
ated, -1, 0, 0 and (0, 0, 0) are returned as the radius, central angle, arc length and center point, respec-
tively.
(5) It is not possible to describe a function that contains an argument in <position 1>, <position 2>, <position
3>, <numeric variable 1>, <numerical variable 2>, <numeric variable 3> and <position variable 1>. If
such a function is described, an error will be generated during execution.
4-404 Detailed Explanation of Functions
<Numeric Variable 1>, <Numeric Variable 2>, <Numeric Variable 3>,
<Position Variables 1>)
Specifies the starting point of the arc.
Specifies the passing point of the arc. Same as the three points in the Mvr
command.
Specifies the endpoint of the arc.
Radius of the specified arc (in mm) will be calculated and returned.
Central angle of the specified arc (in radians) will be calculated and returned.
Length of the specified arc (in mm) will be calculated and returned.
The center coordinates of the specified arc (in mm) will be calculated and
returned (as a position data type, ABC are all zeros).
Return value
1: Calculation was performed normally.
-1: Of positions 1, 2, and 3, either two points had the exact same position or all
three points were on a straight line.
-2: All three points are at approximately the same position.
' Ends if an error occurs.
' Radius.
' Circular arc angle.
' Circular arc length.
' Coordinates of the center point.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents