G81 and G83 drilling cycles not working with freecad

Post anything you want to discuss with others about the software.

G81 and G83 drilling cycles not working with freecad

Postby Rod » Thu Nov 09, 2023 10:22 am

I have tried and tried to get a simple drill cycle job to work using freecad and the uccnc post processor. It will not work. It drills the firs hole and then skips over all other holes, just stopping for a fraction of a second over the hole positioins but no Z movement. I have tried G81 cycle and the G83 peck cycle. Tried different retracts and all sorts but no joy.
Have used different post processor like grbl and mach 3/4 and works great. Any thoughts on this would be appreciated. Here is my gcode file.

Code: Select all
%prog1
(uccnc_post with default settings)
(Exported by FreeCAD for UC-CNC)
(Post Processor: uccnc_post, version 0.0.4)
(CAM file: E:/lathe projects - knurling tool/cad/WORKING FOLDER-PROJECT/for cutting/cnc bed drill job1.FCStd)
(Output Time: 2023-11-09 09:52:48.632645)
(Units: 'mm' and 'mm/min')
(preamble: begin)
G17 (Default: XY-plane)
G54 (Default: First coordinate system)
G40 (Default: Cutter radius compensation none)
G49 (Default: Tool Length Offsets: cancel tool length)
G90 (Default: Absolute distance mode selection)
G80 (Cancel canned cycle)
(preamble: done)
(operation initialise: Fixture)
(operation start: Fixture)
G54
(operation done: Fixture)
(operation finalised: Fixture)
(operation initialise: 13mm_Drill001)
(operation start: 13mm_Drill001)
(13mm_Drill001)
M6 T1
(operation done: 13mm_Drill001)
(operation finalised: 13mm_Drill001)
(operation initialise: Drilling)
(operation start: Drilling)
(Drilling)
(Begin Drilling)
G0 Z3.000
G90
G98
G0 X8.280 Y9.370
G83 Z-4.000 R4.000 F200.000 Q4.000
G0 Y149.370
G83 F200.000
G0 Y289.370
G83 F200.000
G0 Y409.370
G83 F200.000
G0 Y549.370
G83 F200.000
G0 Y689.370
G83 F200.000
G0 Y809.370
G83 F200.000
G0 Y949.370
G83 F200.000
G0 X184.380
G83 F200.000
G0 Y809.370
G83 F200.000
G0 Y689.370
G83 F200.000
G0 Y549.370
G83 F200.000
G0 Y409.370
G83 F200.000
G0 Y289.370
G83 F200.000
G0 Y149.370
G83 F200.000
G0 Y9.370
G83 F200.000
G0 X361.040
G83 F200.000
G0 Y149.370
G83 F200.000
G0 Y289.370
G83 F200.000
G0 Y409.370
G83 F200.000
G0 Y549.370
G83 F200.000
G0 Y689.370
G83 F200.000
G0 Y809.370
G83 F200.000
G0 Y949.370
G83 F200.000
G0 X527.040
G83 F200.000
G0 Y809.370
G83 F200.000
G0 Y689.370
G83 F200.000
G0 Y549.370
G83 F200.000
G0 Y409.370
G83 F200.000
G0 Y289.370
G83 F200.000
G0 Y149.370
G83 F200.000
G0 Y9.370
G83 F200.000
G80
G0 Z2.000
G0 Z3.000
(operation done: Drilling)
(operation finalised: Drilling)
(postamble: begin)
M05 (stop spindle)
G17 (Default: XY-plane)
G54 (Default: First coordinate system)
G40 (Default: Cutter radius compensation none)
G90 (Default: Absolute distance mode selection)
G80 (Cancel canned cycle)
M30 (Stop program and rewind code)
(postamble: done)
 

and with no peck- G81.

Code: Select all
%prog1
(uccnc_post with default settings)
(Exported by FreeCAD for UC-CNC)
(Post Processor: uccnc_post, version 0.0.4)
(CAM file: E:/lathe projects - knurling tool/cad/WORKING FOLDER-PROJECT/for cutting/cnc bed drill job1.FCStd)
(Output Time: 2023-11-09 10:18:21.674436)
(Units: 'mm' and 'mm/min')
(preamble: begin)
G17 (Default: XY-plane)
G54 (Default: First coordinate system)
G40 (Default: Cutter radius compensation none)
G49 (Default: Tool Length Offsets: cancel tool length)
G90 (Default: Absolute distance mode selection)
G80 (Cancel canned cycle)
(preamble: done)
(operation initialise: Fixture)
(operation start: Fixture)
G54
(operation done: Fixture)
(operation finalised: Fixture)
(operation initialise: 13mm_Drill001)
(operation start: 13mm_Drill001)
(13mm_Drill001)
M6 T1
(operation done: 13mm_Drill001)
(operation finalised: 13mm_Drill001)
(operation initialise: Drilling)
(operation start: Drilling)
(Drilling)
(Begin Drilling)
G0 Z5.000
G90
G98
G0 X8.280 Y9.370
G81 Z-4.000 R3.000 F200.000
G0 Y149.370
G81 F200.000
G0 Y289.370
G81 F200.000
G0 Y409.370
G81 F200.000
G0 Y549.370
G81 F200.000
G0 Y689.370
G81 F200.000
G0 Y809.370
G81 F200.000
G0 Y949.370
G81 F200.000
G0 X184.380
G81 F200.000
G0 Y809.370
G81 F200.000
G0 Y689.370
G81 F200.000
G0 Y549.370
G81 F200.000
G0 Y409.370
G81 F200.000
G0 Y289.370
G81 F200.000
G0 Y149.370
G81 F200.000
G0 Y9.370
G81 F200.000
G0 X361.040
G81 F200.000
G0 Y149.370
G81 F200.000
G0 Y289.370
G81 F200.000
G0 Y409.370
G81 F200.000
G0 Y549.370
G81 F200.000
G0 Y689.370
G81 F200.000
G0 Y809.370
G81 F200.000
G0 Y949.370
G81 F200.000
G0 X527.040
G81 F200.000
G0 Y809.370
G81 F200.000
G0 Y689.370
G81 F200.000
G0 Y549.370
G81 F200.000
G0 Y409.370
G81 F200.000
G0 Y289.370
G81 F200.000
G0 Y149.370
G81 F200.000
G0 Y9.370
G81 F200.000
G80
G0 Z3.000
G0 Z5.000
(operation done: Drilling)
(operation finalised: Drilling)
(postamble: begin)
M05 (stop spindle)
G17 (Default: XY-plane)
G54 (Default: First coordinate system)
G40 (Default: Cutter radius compensation none)
G90 (Default: Absolute distance mode selection)
G80 (Cancel canned cycle)
M30 (Stop program and rewind code)
(postamble: done)

Thanks.
Rod
 
Posts: 2
Joined: Sat Oct 28, 2023 6:29 pm

Re: G81 and G83 drilling cycles not working with freecad

Postby dezsoe » Thu Nov 09, 2023 1:11 pm

The generated g-code is bad. Here is the first fixed manually:

Code: Select all
(uccnc_post with default settings)
(Exported by FreeCAD for UC-CNC)
(Post Processor: uccnc_post, version 0.0.4)
(CAM file: E:/lathe projects - knurling tool/cad/WORKING FOLDER-PROJECT/for cutting/cnc bed drill job1.FCStd)
(Output Time: 2023-11-09 09:52:48.632645)
(Units: 'mm' and 'mm/min')
(preamble: begin)
G17 (Default: XY-plane)
G54 (Default: First coordinate system)
G40 (Default: Cutter radius compensation none)
G49 (Default: Tool Length Offsets: cancel tool length)
G90 (Default: Absolute distance mode selection)
G80 (Cancel canned cycle)
(preamble: done)
(operation initialise: Fixture)
(operation start: Fixture)
G54
(operation done: Fixture)
(operation finalised: Fixture)
(operation initialise: 13mm_Drill001)
(operation start: 13mm_Drill001)
(13mm_Drill001)
M6 T1
(operation done: 13mm_Drill001)
(operation finalised: 13mm_Drill001)
(operation initialise: Drilling)
(operation start: Drilling)
(Drilling)
(Begin Drilling)
G0 Z3.000
G90
G98
G0 X8.280 Y9.370
G83 Z-4.000 R4.000 F200.000 Q4.000
G83 Y149.370
G83 Y289.370
g83 Y409.370
g83 Y549.370
g83 Y689.370
g83 Y809.370
g83 Y949.370
g83 X184.380
g83 Y809.370
g83 Y689.370
g83 Y549.370
g83 Y409.370
g83 Y289.370
g83 Y149.370
g83 Y9.370
g83 X361.040
g83 Y149.370
g83 Y289.370
g83 Y409.370
g83 Y549.370
g83 Y689.370
g83 Y809.370
g83 Y949.370
g83 X527.040
g83 Y809.370
g83 Y689.370
g83 Y549.370
g83 Y409.370
g83 Y289.370
g83 Y149.370
g83 Y9.370
G80
G0 Z2.000
G0 Z3.000
(operation done: Drilling)
(operation finalised: Drilling)
(postamble: begin)
M05 (stop spindle)
G17 (Default: XY-plane)
G54 (Default: First coordinate system)
G40 (Default: Cutter radius compensation none)
G90 (Default: Absolute distance mode selection)
G80 (Cancel canned cycle)
M30 (Stop program and rewind code)
(postamble: done)

In a canned cycle (now G83) you must set at least one of the 3 axes. Replacing the G0s with G83 and deleting the G0s made the code work.
dezsoe
 
Posts: 2079
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: G81 and G83 drilling cycles not working with freecad

Postby Rod » Thu Nov 09, 2023 1:36 pm

Thank you so much for getting back to me. I will try this. Any idea as to why freecad does this considering it is a uccnc post processor?
Rod
 
Posts: 2
Joined: Sat Oct 28, 2023 6:29 pm

Re: G81 and G83 drilling cycles not working with freecad

Postby A_Camera » Mon Nov 20, 2023 8:42 am

Rod wrote:Thank you so much for getting back to me. I will try this. Any idea as to why freecad does this considering it is a uccnc post processor?

Is there a UCCNC post processor for Freecad? I have been using it for many years but perhaps I missed the last updates so I didn't know about this.
A_Camera
 
Posts: 638
Joined: Tue Sep 20, 2016 11:37 am

Re: G81 and G83 drilling cycles not working with freecad

Postby dezsoe » Mon Nov 20, 2023 9:01 am

You can find it here (or similar, depending on your version):

Code: Select all
C:\Program Files\FreeCAD 0.21\Mod\Path\Path\Post\scripts\uccnc_post.py
dezsoe
 
Posts: 2079
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 13 guests