Feature Request - Canned Cycle Termination - G80

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
bmsaus4ax
Posts: 255
Joined: Sat Nov 14, 2020 9:16 pm
Location: Bargara, Queensland, Australia UTC+10

Re: Feature Request - Canned Cycle Termination - G80

Post by bmsaus4ax »

luvtofish wrote: Sun Apr 24, 2022 12:38 am

Can you share the model you created so I can test it? Thanks
Should have been included before , sorry.
Attachments
mod_test.FCStd
(54.55 KiB) Downloaded 24 times
User avatar
luvtofish
Posts: 83
Joined: Thu Mar 31, 2022 8:45 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by luvtofish »

bmsaus4ax -- Interesting, I'm getting this error when I load your model. I had to change the post processor of course, but this error will not clear and recompute failed.


20:05:06 Traceback (most recent call last):
File "D:\FreeCAD\FreeCAD_0.20.27428_Win-LPv12.5.4_vc17.x-x86-64\Mod\Path\PathScripts\PathJob.py", line 662, in execute
obj.Path = obj.Operations.Path
<class 'AttributeError'>: 'App.DocumentObjectGroup' object has no attribute 'Path'
20:05:06 Recompute failed! Please check report view.
20:05:12 Traceback (most recent call last):
File "D:\FreeCAD\FreeCAD_0.20.27428_Win-LPv12.5.4_vc17.x-x86-64\Mod\Path\PathScripts\PathJob.py", line 662, in execute
obj.Path = obj.Operations.Path
<class 'AttributeError'>: 'App.DocumentObjectGroup' object has no attribute 'Path'
20:05:12 Recompute failed! Please check report view.

Version:
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.27428 (Git)
Build type: Release
Branch: master
Hash: 27460358508a2057e0ec57a418641435f12628dd
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)
User avatar
freman
Veteran
Posts: 2203
Joined: Tue Nov 27, 2018 10:30 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by freman »

bmsaus4ax -- Interesting, I'm getting this error when I load your model. I had to change the post processor of course, but this error will not clear and recompute failed.
Using a recent master build, I was able to open bmsaus4ax's mod-test.FCStd file and recompute the drilling operation.
I can see the unprocessed Gcode in Path | Inspect Path Commands .
If I want to do Path | Post Process, I need to change post processor in Job edit and remove all the options which don't apply to my post processor (grbl).
Last edited by freman on Sun Apr 24, 2022 9:12 am, edited 1 time in total.
User avatar
freman
Veteran
Posts: 2203
Joined: Tue Nov 27, 2018 10:30 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by freman »

luvtofish wrote: Sat Apr 23, 2022 8:18 pm Actually -- the last file I uploaded had the wrong two holes selected. Here's the updated file that matches the video:
opening your file on recent master ( a few days old ) , I get the following Gcode: no anomalous back and forth.

Code: Select all

(Drilling)
(Begin Drilling)
G0 F0.000000 Z39.700200
G90
G98
G0 F0.000000 X5.080000 Y5.080000
G0 F0.000000 Z30.000200
G83 F0.846667 Q4.762500 R27.000200 X5.080000 Y5.080000 Z-1.870218
G0 F0.000000 X71.120000 Y5.080000
G0 F0.000000 Z30.000200
G83 F0.846667 Q4.762500 R27.000200 X71.120000 Y5.080000 Z-1.870218
G80
G0 F0.000000 Z30.000200
G0 Z39.700200
User avatar
freman
Veteran
Posts: 2203
Joined: Tue Nov 27, 2018 10:30 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by freman »

jffmichi wrote: Sun Apr 24, 2022 12:29 am Maybe I am missing something about canned cycles but aren't the G0 and G1 moves inbetween the G83s canceling the canned cycle anyway (as if by inserting a G80 after every G83). See the LinuxCNC documentation for G80: "[...] programming any other G code from modal group 1 will also cancel the canned cycle". Modal group 1 is the Motion group including G0 and G1.

So the way I see it we should just ditch all G0 and G1s inbetween G83s and let the canned cycles take care of the inbetween moves (???)

Best wishes and thank you all,
jffmichi
Agreed. That seems to be the original point of this thread. Certain parameters ( called "sticky" in NIST GCODE documentation ) do not need repeating for each hole once they are set. That is somewhat the point of "canned cycles". You set the first one , then each subsequent hole is just given by new X,Y coords and is drilled in the same way.

Issuing a G0 or G1 cancels the canned cycle and the next hole again needs fully specifying.

Since many simple GCODE interpreters do not implement canned cycle behaviour, this is a safe fall back position but this would normally be expanded in the post processor.

It seems that FreeCAD is not currently producing canned cycles.
User avatar
luvtofish
Posts: 83
Joined: Thu Mar 31, 2022 8:45 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by luvtofish »

Freman -- I'm running the latest weekly build of v20. Maybe I need to do a complete removal of freecad including saved preferences and try again?
Odd that it works for you and not me. I'm running FreeCAD on Windows 11 -- not sure if that has any bearing on things.

So strange that it works for some and not for me.
Last edited by luvtofish on Sun Apr 24, 2022 3:57 pm, edited 1 time in total.
User avatar
freman
Veteran
Posts: 2203
Joined: Tue Nov 27, 2018 10:30 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by freman »

I run Linux but I would not expect that to make a difference at this level.
User avatar
luvtofish
Posts: 83
Joined: Thu Mar 31, 2022 8:45 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by luvtofish »

I got it working correctly now. I reset all the preferences to a vanilla install and it seems to be working correctly. No longer getting the back and forth motion. No idea what changed other than removing the old installation and preferences.

update: Okay -- it works so long as I don't change the post processor to anything other than what you currently have it set to. Even though that post does not exist on my system.
User avatar
luvtofish
Posts: 83
Joined: Thu Mar 31, 2022 8:45 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by luvtofish »

I have a Linux machine, think I’m going try installing the latest freecad version there and see if the issue still exists.
User avatar
freman
Veteran
Posts: 2203
Joined: Tue Nov 27, 2018 10:30 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by freman »

First of all you can eliminate any discussion of post processors by using Path | Inspect Path Commands. That allows you see the Gcode before FreeCAD passes it to the post processor.

I used grbl PP on this and did not see any issues.

I suggest you try those two steps separately. What PP were you applying when you changed it from what was in the file posted here?
Post Reply