User stock removal programs
14.6 Calculate circle data (CALCDAT)
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
14-15
14.6 14.6 Calculate circle data (CALCDAT)
Function
Calculation of radius and circle center point coordinates from three or four known circle
points. 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.
Programming
VARIB = CALCDAT (PT[n,2], NUM, RES)
Note
Please note that variables must be defined before they are used.
The specified status indicates whether the three or four known points are on a circle
(VARIB = TRUE) or not (VARIB = FALSE).
Parameters
CALCDAT Calculate the radiuses and centers of a circle that consists of 3
or 4 points.
VARIB Variable for status
TRUE = circle, FALSE = no circle
PT [n,2] Points for calculation
n = number of points (3 or 4);
2 = point coordinates
NUM Number of points used for calculation: 3 or 4
RES [3] Variable for result: specification of circle center point
coordinates and radius;
0 = abscissa, 1 = ordinate of circle center point; 2 = radius