Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
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.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings
