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!
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by freman »

regardless of passing the --modal argument to the post.
Sorry , can't comment. I'm not familiar with the fanuc post-processor and I don't have time to look into it.
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature Request - Canned Cycle Termination - G80

Post by chrisb »

The modal argument means usually that some parameters are not repeated, e.g. the repition of subsequent G1 commands at same height doesn't need the repitition of the same Z parameter.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
lylejabe
Posts: 4
Joined: Fri Sep 30, 2022 4:35 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by lylejabe »

Modal to a machinist means that once a command is issued it stays in the control. G1, for instance, is modal meaning that once a G1 is called, subsequent commands only require the next X,Y, Z location. Omitting a coordinate just means the tool stays at the last commanded position in that axis.
G1 X1.0 Y1.0 F3.0 (Feed mode)
Z-1.0 (Still in Feed mode = modal)
X5.0
Y9.0
G0 Z0 (Change to Rapid mode)
X0 Y0 (Still in Rapid mode = modal)

It's the G mode that does not get repeated, until another G code in the same group is called or G80 is called to cancel the canned cycle. X,Y, and Z positions aren't referred to as being 'modal', they're just positions - once the tool is there, it's there. It's not in a 'mode', it's in a position.

Perhaps that's what's confusing me, FreeCAD terminology definitions versus CNC programming terminology. I don't mean to sound like a smarta**, I'm just a bit confused.
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Feature Request - Canned Cycle Termination - G80

Post by sliptonic »

lylejabe wrote: Fri Oct 07, 2022 2:27 pm Modal to a machinist means that once a command is issued it stays in the control. G1, for instance, is modal meaning that once a G1 is called, subsequent commands only require the next X,Y, Z location. Omitting a coordinate just means the tool stays at the last commanded position in that axis.
We might be a bit loose with our terminology. That's what you get with software written by programmers and amateur machinists. :lol: As Path improves, more professionals are showing up and we'll try to improve our terminology.

In this case, there are two flags that can be sent to the post.
--modal does what you say. It suppresses repeating the gcode on a line if it's the same as the previous line.
--axis-modal Does the same thing with coordinates. If a axis coordinate is the same as the previous command, it's suppressed.
lylejabe
Posts: 4
Joined: Fri Sep 30, 2022 4:35 pm

Re: Feature Request - Canned Cycle Termination - G80

Post by lylejabe »

Thanks, that's what I expected...but it doesn't. It still outputs a G0 on every new location. Again, I'm not a python guy, but I would imagine an if/then statement in the post would take care of the redundancy. The whole point of canned cycles is just that. I'd be happy to help. I'm certainly no expert, but I do appreciate what you're doing with this project.
Helical
Posts: 9
Joined: Fri Sep 16, 2022 10:05 am

Re: Feature Request - Canned Cycle Termination - G80

Post by Helical »

lylejabe wrote: Thu Oct 06, 2022 2:26 pm This is my first post here on the forum so please excuse me if I'm out of line here, but I would respectfully have to disagree with:

"The lack of proper use of canned cycles does not seem that important since it just means somewhat more voluminous GCODE output rather than any disfunction at the machine level."
My first post here as well, I agree with your on the modality of canned cycles. I was in the process of thinking how to address this issue, my controller will not accept the output of the fanuc preprocessor without removing the extra canned cycle. BTW broken fanuc.py can be fixed by removing the tapping part of the code.
Like yourself I have to drill lots of holes and manually removing the 2 surplus lines per hole is annoying and error prone.
Helical
Posts: 9
Joined: Fri Sep 16, 2022 10:05 am

Re: Feature Request - Canned Cycle Termination - G80

Post by Helical »

Regarding the fanuc post processor not implementing - -modal switch. The fanuc postprocessor is modal by default and the arguements are --no-modal and --no-axis-modal. These switches work opposite to say the mach3 post. Anyway as you say they do not work with the G82 or G81. Looking at the problem it should not be difficult to handle in the post processor. A possible algorithm would be: If command = canned cycle set canned cycle flag then store all the parameters for that cycle including X and Y if set.
If g80 then clear canned cycle flag and stored parameters.
else if canned cycle command (eat it) if canned cycle parameters are unchanged (eat them) else pass them and update the stored parameters
If G0, (eat it) if XYZ unchanged eat them else pass them and update the stored values.
By eat I mean do not pass to the output.
I may have missed something but i think this would work with most canned cycles on fanuc controllers and would allow the parameters to be changed while in the canned cycle. I am not sure if the cam processor does this but if it is allowed in Gcode then better to handle it just in case.
Post Reply