Hello Guest it is March 31, 2020, 02:18:20 AM

Author Topic: Joining 2 gcode files together.  (Read 1653 times)

0 Members and 1 Guest are viewing this topic.

Joining 2 gcode files together.
« on: June 24, 2014, 09:07:27 AM »
I have a few programs which are all for the same job, and use the same tool, I'd like to combine these programs into one.
Code: [Select]
%
O5000 (STUDHOLES.TAP)
( MCV-OP ) (24-APR-2014)
(SUBROUTINES: O2 .. O0)        
G90 G17
G80 G49 G40
G55
G91 G28 Z0
G90
M01
N1 M6 T6
(TOOL -6- MILL DIA 10.0 R0. MM )
G90 G00 G40 G55
G43 H6 D36 G0 X-4.142 Y-49.86 Z20. S1000 M3
M8
(------------------)
(STUDHOLES - POCKET)
(------------------)
   X-4.142 Y-49.86 Z15.
   Z5.
G1 Z-5. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-10. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-15. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-20. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-25. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-25.4 F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
   X-4.142 Y-49.86 I2.975 J0. F500
G0 Z15.
   X-54.942 Y0.94
   Z5.
G1 Z-5. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-10. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-15. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-20. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-25. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-25.4 F33
G3 X-54.942 Y0.94 I2.975 J0. F500
   X-54.942 Y0.94 I2.975 J0. F500
G0 Z15.
   X-4.142 Y51.74
   Z5.
G1 Z-5. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-10. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-15. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-20. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-25. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-25.4 F33
G3 X-4.142 Y51.74 I2.975 J0. F500
   X-4.142 Y51.74 I2.975 J0. F500
G0 Z15.
   X46.658 Y0.94
   Z5.
G1 Z-5. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-10. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-15. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-20. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-25. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-25.4 F33
G3 X46.658 Y0.94 I2.975 J0. F500
   X46.658 Y0.94 I2.975 J0. F500
G0 Z15.
M30
%

and
Code: [Select]
%
O5000 (OD REBATE.TAP)
( MCV-OP ) (24-APR-2014)
(SUBROUTINES: O2 .. O0)        
G90 G17
G80 G49 G40
G55
G91 G28 Z0
G90
M01
N1 M6 T6
(TOOL -6- MILL DIA 10.0 R0. MM )
G90 G00 G40 G55
G43 H6 D36 G0 X-141.167 Y0.94 Z20. S1000 M3
M8
(------------------)
(OD REBATE - POCKET)
(------------------)
   X-141.167 Y0.94 Z15.
   Z5.
G1 Z-5. F33
G2 X-141.167 Y0.94 I140. J0. F500
G1 X-136.167
G2 X-136.167 Y0.94 I135. J0.
G1 X-131.167
G2 X-131.167 Y0.94 I130. J0.
G1 X-128.167
G2 X-128.167 Y0.94 I127. J0.
G1 X-127.667
G2 X-127.667 Y0.94 I126.5 J0. F500
G0 Z15.
   X-141.167
   Z0.
G1 Z-7. F33
G2 X-141.167 Y0.94 I140. J0. F500
G1 X-136.167
G2 X-136.167 Y0.94 I135. J0.
G1 X-131.167
G2 X-131.167 Y0.94 I130. J0.
G1 X-128.167
G2 X-128.167 Y0.94 I127. J0.
G1 X-127.667
G2 X-127.667 Y0.94 I126.5 J0. F500
G0 Z15.
M30
%


I was just going to append everything below "(OD REBATE - POCKET)" on the bottom of the code above and remove M30,

like this:
Code: [Select]
%
O5000 (STUDHOLES.TAP)
( MCV-OP ) (24-APR-2014)
(SUBROUTINES: O2 .. O0)         
G90 G17
G80 G49 G40
G55
G91 G28 Z0
G90
M01
N1 M6 T6
(TOOL -6- MILL DIA 10.0 R0. MM )
G90 G00 G40 G55
G43 H6 D36 G0 X-4.142 Y-49.86 Z20. S1000 M3
M8
(------------------)
(STUDHOLES - POCKET)
(------------------)
   X-4.142 Y-49.86 Z15.
   Z5.
G1 Z-5. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-10. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-15. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-20. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-25. F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
G1 Z-25.4 F33
G3 X-4.142 Y-49.86 I2.975 J0. F500
   X-4.142 Y-49.86 I2.975 J0. F500
G0 Z15.
   X-54.942 Y0.94
   Z5.
G1 Z-5. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-10. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-15. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-20. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-25. F33
G3 X-54.942 Y0.94 I2.975 J0. F500
G1 Z-25.4 F33
G3 X-54.942 Y0.94 I2.975 J0. F500
   X-54.942 Y0.94 I2.975 J0. F500
G0 Z15.
   X-4.142 Y51.74
   Z5.
G1 Z-5. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-10. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-15. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-20. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-25. F33
G3 X-4.142 Y51.74 I2.975 J0. F500
G1 Z-25.4 F33
G3 X-4.142 Y51.74 I2.975 J0. F500
   X-4.142 Y51.74 I2.975 J0. F500
G0 Z15.
   X46.658 Y0.94
   Z5.
G1 Z-5. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-10. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-15. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-20. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-25. F33
G3 X46.658 Y0.94 I2.975 J0. F500
G1 Z-25.4 F33
G3 X46.658 Y0.94 I2.975 J0. F500
   X46.658 Y0.94 I2.975 J0. F500
G0 Z15.
(------------------)
(OD REBATE - POCKET)
(------------------)
   X-141.167 Y0.94 Z15.
   Z5.
G1 Z-5. F33
G2 X-141.167 Y0.94 I140. J0. F500
G1 X-136.167
G2 X-136.167 Y0.94 I135. J0.
G1 X-131.167
G2 X-131.167 Y0.94 I130. J0.
G1 X-128.167
G2 X-128.167 Y0.94 I127. J0.
G1 X-127.667
G2 X-127.667 Y0.94 I126.5 J0. F500
G0 Z15.
   X-141.167
   Z0.
G1 Z-7. F33
G2 X-141.167 Y0.94 I140. J0. F500
G1 X-136.167
G2 X-136.167 Y0.94 I135. J0.
G1 X-131.167
G2 X-131.167 Y0.94 I130. J0.
G1 X-128.167
G2 X-128.167 Y0.94 I127. J0.
G1 X-127.667
G2 X-127.667 Y0.94 I126.5 J0. F500
G0 Z15.
M30
%

I noticed that the G43 values are not the same, is this going to be a problem?? I don't understand what G43 does. Any help would be great.

Thanks

Jim
« Last Edit: June 24, 2014, 09:09:11 AM by Jimster »

Offline Graham Waterworth

*
  • *
  •  1,977 1,977
  • Yorkshire Dales, England
    • View Profile
Re: Joining 2 gcode files together.
« Reply #1 on: June 25, 2014, 10:15:07 AM »
G43 enables you offsets, in this program H6 and D36 H6 is the height and D36 is the diameter offset of the tool.

Without engineers the world stops