How to use FitCircle?
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.
VAR pos points{3}:=[[500,-100,600],[577,130,600],[552,226,600]];
VAR num radius;
VAR pos center;
VAR pos normal;
!***********************************************************
PROC main()
center:=[700,-200,600];
radius:=6;
normal:=[0,0,1];
FitCircle points,center,radius,normal;
ENDPROC
ENDMODULE
0
Answers
-
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;!***********************************************************PROC main()VAR robtarget StartPoint;VAR robtarget MidPoint;VAR robtarget endpoint;StartPoint:=CRobT();MidPoint:=StartPoint;endpoint:=StartPoint;StartPoint.trans:=points{1};MidPoint.trans:=points{2};EndPoint.trans:=points{3};! center:=[700,-200,600];! radius:=6;! normal:=[0,0,1];! FitCircle points,center,radius,normal;MoveL StartPoint,v10,fine,tool0;MoveC MidPoint,endpoint,v10,fine,tool0;ENDPROC
Let me know if that answers your questions and good luck programming0 -
Thank you. I go to try it.
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings