moves in machine coordinate system (G53) in linuxcnc

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
rmu
Posts: 40
Joined: Wed Aug 02, 2017 6:09 am

moves in machine coordinate system (G53) in linuxcnc

Postby rmu » Sun May 06, 2018 2:48 pm

G53 is a special kind of coordinate system. The difference to G54 et al is that G53 is not modal (at least in linuxcnc it is not modal), i.e. has to be programmed on every line on a move.

The problem is that Path changes custom code

Code: Select all

G53 G1 Z0
G53 G0 X0 Y0
into

Code: Select all

G53
G1 Z0
G0 X0 Y0
in other words treats G53 like a fixture which it is not in linuxcnc.

I could fix this in linuxcnc_post, but I wanted to ask how other controllers handle the "modality" of G53.
chrisb
Posts: 17474
Joined: Tue Mar 17, 2015 9:14 am

Re: moves in machine coordinate system (G53) in linuxcnc

Postby chrisb » Sun May 06, 2018 3:53 pm

With the philips control it is modal.
mlampert
Posts: 1274
Joined: Fri Sep 16, 2016 9:28 pm

Re: moves in machine coordinate system (G53) in linuxcnc

Postby mlampert » Sun May 06, 2018 6:06 pm

IIRC linuxcnc has a setting for modal vs. non-modal output.
GeneFC
Posts: 1025
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: moves in machine coordinate system (G53) in linuxcnc

Postby GeneFC » Mon May 07, 2018 12:30 am

There are a few codes that are never modal in linuxcnc, including G53. As noted above, a G53 code in a program line must be accompanied on the same line with a G0 or G1 code. Otherwise an error will be raised.

I believe the principal use of G53 is to accommodate part loaders, tool loaders, or metrology equipment. I don't have any of these, so I would be unlikely to ever use G53.

Gene
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: moves in machine coordinate system (G53) in linuxcnc

Postby Konstantin » Mon May 07, 2018 5:40 am

G53 is very specific coordinate system. On some controllers you can't even call it in regular program. Can someone tell me, why you use it? How it is used in LinuxCNC?
User avatar
rmu
Posts: 40
Joined: Wed Aug 02, 2017 6:09 am

Re: moves in machine coordinate system (G53) in linuxcnc

Postby rmu » Mon May 07, 2018 9:25 am

Konstantin wrote:
Mon May 07, 2018 5:40 am
G53 is very specific coordinate system. On some controllers you can't even call it in regular program. Can someone tell me, why you use it? How it is used in LinuxCNC?
I use it sometimes to move the head out of the way, regardless of current coordinate system/fixture, tool compensation and so on.
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: moves in machine coordinate system (G53) in linuxcnc

Postby Konstantin » Wed May 09, 2018 7:08 am

rmu wrote:
Mon May 07, 2018 9:25 am
I use it sometimes to move the head out of the way, regardless of current coordinate system/fixture, tool compensation and so on.
Hm, it's a very specific use case. It might be specific for every machine, I don't think it's a good idea to add this for everyone. By the way, how would you use it in FreeCAD at all? It has only machining paths, how you will generate your G53 moves (which as you say will move "regardless of current coordinate system/fixture, tool compensation and so on")? Make a special path by hand? You use it instead of G28 or G30? I don't get it. Maybe you are making something very specific, without example I can't understand it. But I think it's a better idea to make your local modification of linuxcnc postprocessor.

Another thought that came into my mind is: LinuxCNC machines are very different, to different to make something universal in one file. Most painful area is a tool change I think. User wants to use FreeCAC's postprocessor, because it constantly evolving and updating, but he needs to add something in toolchange section and he has to "fork" postprocessor locally with modified section and do it every time original postprocessor and freecad has changed something Wouldn't it be a better idea to split it? For example, add an argument "--use_toolchange_file=/my/precious/hardcoded/toolchange/file", and if it is set, use users file with needed operations.
User avatar
rmu
Posts: 40
Joined: Wed Aug 02, 2017 6:09 am

Re: moves in machine coordinate system (G53) in linuxcnc

Postby rmu » Wed May 09, 2018 8:45 am

Konstantin wrote:
Wed May 09, 2018 7:08 am
rmu wrote:
Mon May 07, 2018 9:25 am
I use it sometimes to move the head out of the way, regardless of current coordinate system/fixture, tool compensation and so on.
Hm, it's a very specific use case. It might be specific for every machine, I don't think it's a good idea to add this for everyone. By the way, how would you use it in FreeCAD at all? It has only machining paths, how you will generate your G53 moves (which as you say will move "regardless of current coordinate system/fixture, tool compensation and so on")? Make a special path by hand? You use it instead of G28 or G30? I don't get it. Maybe you are making something very specific, without example I can't understand it. But I think it's a better idea to make your local modification of linuxcnc postprocessor.
As I said, I'm using a "custom" operation to move the head out of the way (for refixturing etc...). This "custom" operation is mangled because FreeCAD Path does not copy the custom G-Code verbatim but interprets it and outputs it's own understanding, and that includes treating G53 as modal. Which is wrong in the case of linuxcnc and possibly other controllers.

I'm not proposing to add some automagic "move toolhead out of the way", I'm only proposing that custom g-code involving G53 should produce sane output.

G28 and G30 is reserved for other purposes on my machine (manual toolchange, tool length sensor, ...)
Konstantin wrote:
Wed May 09, 2018 7:08 am
For example, add an argument "--use_toolchange_file=/my/precious/hardcoded/toolchange/file", and if it is set, use users file with needed operations.
I personally don't think something like that is needed. Custom toolchange actions can be integrated into linuxcnc.
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: moves in machine coordinate system (G53) in linuxcnc

Postby Konstantin » Wed May 09, 2018 8:58 am

rmu wrote:
Wed May 09, 2018 8:45 am
Which is wrong in the case of linuxcnc and possibly other controllers.
Oh, that's the point, sorry, misunderstood. In that case, yes, I think linuxcnc postprocessor must follow linuxcnc reference. Sorry to bother you. I was stuck on idea of using G53 at all.
User avatar
sliptonic
Posts: 1557
Joined: Tue Oct 25, 2011 10:46 pm

Re: moves in machine coordinate system (G53) in linuxcnc

Postby sliptonic » Wed May 09, 2018 1:26 pm

rmu wrote:
Sun May 06, 2018 2:48 pm
I could fix this in linuxcnc_post, but I wanted to ask how other controllers handle the "modality" of G53.
Fix it for Linuxcnc. If it differs for other posts, it might have to be modified on a case by case basis. Doesn't sound like it's widely used though.