# G-CODE TO RAPID

**URL:** <https://tech-community.robotics.abb.com/t/g-code-to-rapid/11741>\
**Category:** RAPID Programming\
**Tags:** a, g-code, machining\
**Created:** [December 23, 2024, 7:02pm UTC](https://tech-community.robotics.abb.com/t/g-code-to-rapid/11741 "2024-12-23T19:02:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ollitap](https://avatars.discourse-cdn.com/v4/letter/o/71c47a/32.png) [@ollitap](https://tech-community.robotics.abb.com/u/ollitap)\
**Post date:** [December 23, 2024, 7:02pm UTC](https://tech-community.robotics.abb.com/t/g-code-to-rapid/11741/1 "2024-12-23T19:02:19Z")

</div>

I want to use my 6600 to mill foam prototypes. I am thinking of buying the ABB software to convert my CAD/CAM data into Rapid. However, I would like to see a sample of what the g - code to rapid would look like.  
Does anyone have a sample

---

<div class="post-metadata">

**Author:** ![revans](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@revans](https://tech-community.robotics.abb.com/u/revans)\
**Post date:** [December 30, 2024, 2:37am UTC](https://tech-community.robotics.abb.com/t/g-code-to-rapid/11741/2 "2024-12-30T02:37:07Z")

</div>

@ollitap  
There are some small modification you can make to the code the system outputs, but there are limitations, tool changes do not work properly, and some of the Cycle commands such as G81 do not work. Double check the manual, but below is an example of code it outputs. Please reach out if you have more in-depth questions. It outputs one main file, then you save the remainder of the files into the robot but they are dynamically loaded and unloaded, meaning the robot will sometimes pause in the middle of machining.

The main file that is loaded into the task.

%%%  
VERSION: 1  
LANGUAGE:ENGLISH  
%%%  
MODULE junction\_plate\_pittplastic  
! Generated by ABB Machining PowerPac - CAM Converter Functionality for ABB Robot IRB6700\_220\_265\_MH6\_04  
VAR speeddata vNC\_UDSPEED0 := [50,100,5000,50];  
VAR speeddata vNC\_UDSPEED1 := [100,200,5000,50];  
VAR speeddata vNC\_UDSPEED2 := [200,400,5000,50];  
VAR speeddata vNC\_UDSPEED3 := [400,400,5000,50];  
VAR speeddata vNC\_UDSPEED4 := [800,400,5000,50];  
VAR speeddata vNC\_UDSPEED5 := [800,400,5000,50];  
VAR speeddata vNC1 := [1.69333326816559,500,5000,50];  
VAR speeddata vNC2 := [6.34999990463257,500,5000,50];  
VAR speeddata vNC3 := [5.07999992370605,500,5000,50];  
VAR speeddata vNC4 := [5.16666650772095,500,5000,50];  
VAR speeddata vNC5 := [16.6666660308838,500,5000,50];  
VAR speeddata vNC6 := [3.45000004768372,500,5000,50];  
VAR speeddata vNC7 := [16.5100002288818,500,5000,50];  
VAR speeddata vNC8 := [2.53999996185303,500,5000,50];  
VAR speeddata vNC9 := [5,500,5000,50];  
VAR speeddata vNC10 := [2.58333325386047,500,5000,50];  
VAR speeddata vNC11 := [2.06666660308838,500,5000,50];  
VAR speeddata vNC12 := [0.200000002980232,500,5000,50];  
VAR speeddata vNC13 := [0.649999976158142,500,5000,50];  
VAR speeddata vNC14 := [4.13333320617676,500,5000,50];  
PERS string SubFiles{2} := [“\_001\_001\_000”,“\_002\_001\_000”];  
PERS string FilePath:=“HOME/junction\_plate\_pittplastic”;  
PERS string FilePrefix:=“Group”;  
PERS string PathPrefix:=“Path”;

PROC pittplastic\_junction\_plate()  
AccSet 50, 50;  
ConfL\On;  
SingArea\Wrist;  
FOR i FROM 1 TO 2 DO  
Load\Dynamic, FilePath\File:=FilePrefix+SubFiles{i}+“.mod”;  
TPWrite SubFiles{i};  
%PathPrefix+SubFiles{i}%;  
UnLoad FilePath\File:=FilePrefix+SubFiles{i}+“.mod”;  
ENDFOR  
ConfL\Off;  
Drill\_Off;  
DropOffBit;  
ENDPROC  
ENDMODULE

Example of the files it is loading dynamically. The tool change calls will not be in there. That was a result of some modifications I made to the converter so it would somewhat properly tool change

%%%  
VERSION: 1  
LANGUAGE:ENGLISH  
%%%  
MODULE Group\_001\_001\_000  
! Generated by ABB Machining PowerPac - CAM Converter Functionality for ABB Robot IRB6700\_220\_265\_MH6\_04

PROC Path\_001\_001\_000()  
ToolChange tDr1\_8;  
MoveJ [[57.15, 12.7000000000003, 120],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], V200, z0, tDr1\_8 \wobj:=wobjMachining ;  
ToolChange tDr1\_8;  
MoveJ [[57.1500000000002, 12.7000000000003, 20],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], V200, z0, tDr1\_8 \wobj:=wobjMachining ;  
ToolChange tDr1\_8;  
MoveJ [[57.15, 12.7000000000003, 10],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], V200, z0, tDr1\_8 \wobj:=wobjMachining ;  
MoveL [[57.15, 12.7000000000003, -9.23700000000008],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], vNC4, z0, tDr1\_8 \wobj:=wobjMachining ;  
MoveL [[57.15, 12.7000000000003, 10],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], vNC5, z0, tDr1\_8 \wobj:=wobjMachining ;  
MoveL [[57.1500000000002, 12.7, 35.3999999999999],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], vNC5, z0, tDr1\_8 \wobj:=wobjMachining ;  
ToolChange tDr1\_8;  
MoveJ [[57.15, 12.7000000000003, 135.4],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], V200, z0, tDr1\_8 \wobj:=wobjMachining ;  
ToolChange tDr1\_8;  
MoveJ [[66.853, 46.9900000000002, 120],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], V200, z0, tDr1\_8 \wobj:=wobjMachining ;  
ToolChange tDr1\_8;  
MoveJ [[66.8530000000002, 46.9900000000002, 20.0000000000002],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], V200, z0, tDr1\_8 \wobj:=wobjMachining ;  
ToolChange tDr1\_8;  
MoveJ [[66.853, 46.9900000000002, 10],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], V200, z0, tDr1\_8 \wobj:=wobjMachining ;  
MoveL [[66.853, 46.9900000000002, -9.23700000000008],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], vNC4, z0, tDr1\_8 \wobj:=wobjMachining ;  
MoveL [[66.853, 46.9900000000002, 10],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], vNC5, z0, tDr1\_8 \wobj:=wobjMachining ;  
MoveL [[66.853, 46.9900000000002, 35.4000000000001],[5.67522450037844E-17, -0.074311754091894, 0.997235059152949, -7.52348101356611E-16],[-1, 0, -1, 1],[9E9,0,0,9E9,9E9,9E9]], vNC5, z0, tDr1\_8 \wobj:=wobjMachining ;
