G54 and fixtures

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!
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: G54 and fixtures

Post by RatonLaveur »

Hey Zolko, great to have a contributor like you come visit here :)

G54 is typically what the CNC nomenclature call a Work Coordinate Offset (or variations thereof depending on the ISO or other norm).
Typically any machine will use offsets G54 to G59. So G54 is considered the "default" one. Often also the pivot point of a 5 axis platform. Note that G53 is absolute machine coordinates and usually follows it's own rules (such as, G53 must be specified for each line of movement code if one wants to use this reference).
They behave very much like the machine version of a Local Coordinate System which you know very well ;)

G54-59 are modals. This means if read once in the code, the whole following code will stay in this reference system.
Hence when your code says G54 at the start, this means all G01 and G02/G03 codes (linear and arc interpolation) will be executed based on that reference.

But it means you must set G54 first on your workpiece. That's usually when you touch off your part using a probe or dial indicator or the tip of your tool...and set the reference. Usually if your machine interface says "set reference" without specifying, it is G54. But you must check.

In the virtual world of Path Workbench, when you create a job the Coordinate System Reference you see displayed is going to be your G54. Path creators and contributors made the tool easy to use and you can select a vertex and apply the reference, orient it..etc. Refer to Sliptonic's great suite of instructional videos on Youtube.

What happened in your case is what chrisb said. You created two jobs, with two slightly different virtual stocks. Hence two slightly different references. So executing both codes means each is referring to another slightly shifted G54, but your machine had only one G54 set for all your operations.

ProTip: if you want to set G54 where your machine is currently you can send the code G92G54X0Y0Z0

Which says "please reset position of G54 at 0;0;0"

Hope this helps, happy chipping!
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: G54 and fixtures

Post by Zolko »

RatonLaveur wrote: Sun Dec 08, 2019 7:09 pm In the virtual world of Path Workbench, when you create a job the Coordinate System Reference you see displayed is going to be your G54.
Thank-you for your explanation. So G54 is the default coordinate system, the "LCS_0" of a Path Job, if nothing else is set, if I understand correctly. It is possible to set other coordinate systems, but if not G54 is the one in use.
try the Assembly4 workbench for FreCAD — tutorials here and here
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: G54 and fixtures

Post by herbk »

Hi Zolko,
yes it is.

At LinuxCNC homepage is a explanation about the G- and M Codes

http://linuxcnc.org/docs/2.7/html/gcode/g-code.html
Gruß Herbert
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: G54 and fixtures

Post by chrisb »

I think G53 is the CS which is used if noone is explicitely set, not G54??
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: G54 and fixtures

Post by sliptonic »

chrisb wrote: Mon Dec 09, 2019 11:02 am I think G53 is the the CS which is used if noone is explicitely set, not G54??
Almost. G53 is the absolute machine coordinate system. G54 is the default system used.
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: G54 and fixtures

Post by RatonLaveur »

It really depends on your type of CNC and how you configured it.

All the industrial CNC i've used work in a way that by default if you write:
G90
G53G01X10
G01X20

Then the machine will first move to the position X 10 in machine coordinates (which depending how the machine manufacturer configured G53, may be outside the work volume and will generate a hard stop or a spindle crash, since some machine standards specify G53 at the rear top right end).

Then it will automatically move to X 20 mm in G54.

If I wanted to go first to 10 and then 20 in the same G53 machine coordinates, i'd have to write:
G90
G53G01X10
G53G01X20

Just one of those things...check your CNC modal state (the current active modals) and see if G53 or G54 is active by default.

Hope this clarifies.
Post Reply