User stock removal programs
15.6 Calculate circle data (CALCDAT)
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
705
15.6 Calculate circle data (CALCDAT)
Function
Using the CALCDAT command, you can calculate the radius and the circle center point
coordinates from the three or four points known along the circle The specified points must be
different. Where four points do not lie directly on the circle an average value is taken for the
circle center point and the radius.
Syntax
<Status>=CALCDAT(<circle points>[<number>,<type>],<number>,<result>)
Significance
CALCDAT
Command to calculate the radius and center point coordinates
of a circle from 3 or 4 points
Variable for the circle calculation status
Type: BOOL
TRUE The specified points lie on a circle.
<status>
Value:
FALSE The specified points do not lie on a
circle.
Variable to specify the circle points
using parameters
<number>
Number of circle points (3 or 4)
<circle points>[]
<type>
Type of coordinate data,
e.g. 2 for 2-point coordinates
<number>
Parameter for the number of the points used for the calculation
(3 or 4)
Variable for result:
Circle center point coordinates and radius
0 Circle center point coordinate: Abscissa value
1 Circle center point coordinate: Ordinate value
<result>[3]
2 Radius
Note
Please note that the variables must be defined before they are used.