Hello. I’m trying to make a circle with the FitCircle instruction in RAPID, but I can’t do it. I have taken the example that appears in the help, but it does not give any errors, but the robot does not move.
MODULE Module1
VAR pos points{3}:=[[500,-100,600],[577,130,600],[552,226,600]];
VAR num radius;
VAR pos center;
VAR pos normal;
Fit circle does not result in robot motion, but just does calculations. If you are trying to get the robot to move, use a MoveC like below. For future reference, you are assigning values manually to center, radius, and normal, however, fit circle overwrites the values you have in there. Fit circle does the calculations to give you the center, radius, and normal based on the points you have given it.
VAR pos points{3}:=[[500,-100,600],[577,130,600],[552,226,600]];
VAR num radius;
VAR pos center;
VAR pos normal;