Does TinyG support G53

Discussion of tinyG control platform
Christine88
Posts: 168
Joined: Tue Oct 07, 2014 4:16 pm

Does TinyG support G53

Post by Christine88 » Sat Oct 18, 2014 5:12 pm

I'm a little confused about the interface of the TinyG controller with Shapeoko 2. The way I understand how a CNC mill works is that it has a built in G53 which is machine zero and can't be changed by a user. Then there is G54-59 which the user sets an XYZ origin and all toolpaths work off G54 normally. All G54-59 origins are referenced off G53. So does the TinyG support G53 as machine zero and G54-59 as user defined zero?

jarretl
Posts: 135
Joined: Mon Feb 24, 2014 2:50 pm
Location: Edmonton, AB

Re: Does TinyG support G53

Post by jarretl » Mon Oct 20, 2014 2:31 pm

Based on the tinyg wiki info, it would appear so:
https://github.com/synthetos/TinyG/wiki ... te-Systems

There is a tinyg-only command G28.3 to set machine coordinates (G53) to zero. This is not available on other controllers, but because tinyg could be used without homing switches, this is an alternative way of letting the user set the machine coords outside of running a homing cycle.
If you don't have homing switches you can move your machine to the position you want to set as absolute zero, and run G28.3 X0 Y0 Z0 to set this as machine zero. After that, you can use G10 L2 P[1-6] X## Y## Z## to set individual offsets for G54-59, respectively. Examples of the G10 L2 P# command are also in the link above.

If you do have homing switches, you would run the homing cycle (G28.2) and your machine coordinates will be set. From there you can set offsets for G54-G59 as needed.

If you run into any trouble you could try PM-ing users ril3y or aldenhart on this forum, they are the makers of tinyg and tgfx, I'm not sure how often they check in here though.

-J.
Shapeoko 2 #4043; DW660

Christine88
Posts: 168
Joined: Tue Oct 07, 2014 4:16 pm

Re: Does TinyG support G53

Post by Christine88 » Mon Oct 20, 2014 4:12 pm

jarretl wrote:Based on the tinyg wiki info, it would appear so:
https://github.com/synthetos/TinyG/wiki ... te-Systems

There is a tinyg-only command G28.3 to set machine coordinates (G53) to zero. This is not available on other controllers, but because tinyg could be used without homing switches, this is an alternative way of letting the user set the machine coords outside of running a homing cycle.
If you don't have homing switches you can move your machine to the position you want to set as absolute zero, and run G28.3 X0 Y0 Z0 to set this as machine zero. After that, you can use G10 L2 P[1-6] X## Y## Z## to set individual offsets for G54-59, respectively. Examples of the G10 L2 P# command are also in the link above.

If you do have homing switches, you would run the homing cycle (G28.2) and your machine coordinates will be set. From there you can set offsets for G54-G59 as needed.

If you run into any trouble you could try PM-ing users ril3y or aldenhart on this forum, they are the makers of tinyg and tgfx, I'm not sure how often they check in here though.

-J.
Thank you for the link. I do have homing switches that work really well. In tgFX I click on the home axes button which sends all three axes to home and zeros them. I assume this is the same as a G28.2 command? But do I need to enter G28.3 after homing?

jarretl
Posts: 135
Joined: Mon Feb 24, 2014 2:50 pm
Location: Edmonton, AB

Re: Does TinyG support G53

Post by jarretl » Mon Oct 20, 2014 6:02 pm

Nope, 28.3 is an alternative for those without homing switches. If you run the homing process from within tgfx you should be good to go. Your G53 machine coordinates are now set, and from there you can start setting your G54-G59 coordinates separately to work on offsets as needed.
Shapeoko 2 #4043; DW660

Christine88
Posts: 168
Joined: Tue Oct 07, 2014 4:16 pm

Re: Does TinyG support G53

Post by Christine88 » Mon Oct 20, 2014 9:15 pm

jarretl wrote:Nope, 28.3 is an alternative for those without homing switches. If you run the homing process from within tgfx you should be good to go. Your G53 machine coordinates are now set, and from there you can start setting your G54-G59 coordinates separately to work on offsets as needed.
Ok cool. But after homing if jog to a X Y Z position and click zero axes in tgFX does that set a G54?

jarretl
Posts: 135
Joined: Mon Feb 24, 2014 2:50 pm
Location: Edmonton, AB

Re: Does TinyG support G53

Post by jarretl » Mon Oct 20, 2014 9:58 pm

The 'zero axes' in tgfx appears to use the G92 temporary offset to set a temporary zero position that is cancelled when the controller restarts or an end of program command is sent (M30).

You are likely working in the G54 coordinate system by default in tinyg, after running homing. However, until you specify an offset from G53, you are essentially using the G53 coordinates as G54.

As an example, if you started up and homed your machine and then ran the following commands:
G54 --enter G54 mode if not already
G21 --use metric mode if not already
G10 L2 P1 X15 Y15 --Set G54 origin to be at 15mm in x and 15mm in y direction

At this point your endmill hasn't moved, but tgfx should tell you your current position has changed to -15mm in x, and -15mm in y, relative to your new origin. So basically you have adjusted your coordinate system without moving the mill at all yet.
You can then run
G0 X0 Y0 --this will move you to the new G54 origin, which relative to your machine coordinates is at 15mm in x, and 15mm in y.


The G92 temporary offset is a bit different in that you would typically move your endmill to the position you want to make your new origin, and run G92 X0 Y0 Z0 to set that point as the origin. The different control software's seem to use it exclusively for zeroing out a workspace, but I think that is because you don't really need knowledge of the G54-G59 work coordinate systems to use it, it applies in any coordinate system, but it is not persistent so will get cleared if certain gcode commands are sent, or if the controller is reset, losing the offset that had been configured.

-J.
Shapeoko 2 #4043; DW660

Christine88
Posts: 168
Joined: Tue Oct 07, 2014 4:16 pm

Re: Does TinyG support G53

Post by Christine88 » Mon Oct 20, 2014 11:59 pm

jarretl wrote:The 'zero axes' in tgfx appears to use the G92 temporary offset to set a temporary zero position that is cancelled when the controller restarts or an end of program command is sent (M30).

You are likely working in the G54 coordinate system by default in tinyg, after running homing. However, until you specify an offset from G53, you are essentially using the G53 coordinates as G54.

As an example, if you started up and homed your machine and then ran the following commands:
G54 --enter G54 mode if not already
G21 --use metric mode if not already
G10 L2 P1 X15 Y15 --Set G54 origin to be at 15mm in x and 15mm in y direction

At this point your endmill hasn't moved, but tgfx should tell you your current position has changed to -15mm in x, and -15mm in y, relative to your new origin. So basically you have adjusted your coordinate system without moving the mill at all yet.
You can then run
G0 X0 Y0 --this will move you to the new G54 origin, which relative to your machine coordinates is at 15mm in x, and 15mm in y.


The G92 temporary offset is a bit different in that you would typically move your endmill to the position you want to make your new origin, and run G92 X0 Y0 Z0 to set that point as the origin. The different control software's seem to use it exclusively for zeroing out a workspace, but I think that is because you don't really need knowledge of the G54-G59 work coordinate systems to use it, it applies in any coordinate system, but it is not persistent so will get cleared if certain gcode commands are sent, or if the controller is reset, losing the offset that had been configured.

-J.
So what is the correct procedure for running a program? I assume first home the machine and then what? In our machine shop where I work, not actually in the shop but in the engineering department, the guys who run the Haas CNC mill, home the machine at startup then they set an XY origin at the corner of a block of material to be milled and then set tool depths on top of the block. I noticed that the XY and Z tool depths are all entered in a G54 section on the controller screen. It looked simple and straight forward but it's a $60000 machine. It's also normal procedure. I thought the TinyG and tgFX would be similar in operation.

Added: just noticed too that at the bottom of the tgFX screen it states coordine system g54

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Does TinyG support G53

Post by cvoinescu » Tue Oct 21, 2014 8:40 am

It's the same, conceptually.

You set the coordinates for the G54 coordinate system using G10 L2 P1 (if you know the offset from the machine coordinates) or G10 L20 P1 (relative to the current position, which is what you describe). For example, you jog to the corner of the block, and issue G10 L20 P1 X0 Y0 Z0, which sets the current position as (0, 0, 0) in the G54 coordinate system. Replace P1 with P2, P3 etc. to set G55, G56 etc. Note that G10 does not also switch to the respective coordinate system; you still need G54, G55 etc. to switch. The machine starts in the G54 work coordinate system by default.

Your GUI may or may not have an interface element for G10 L20, but even if it doesn't, it should be easy enough to type the command.

A confusing factor is that G53 (machine coordinates) works differently from the others: it does not "stick" (it's not modal). It applies only to the command on the same line as it; for the next command, the machine reverts to whatever work coordinate system it had (G54 etc). G53 is useful when dealing with things that are at fixed positions on the machine, such as a tool changer, a pen wipe pad, and so on.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Christine88
Posts: 168
Joined: Tue Oct 07, 2014 4:16 pm

Re: Does TinyG support G53

Post by Christine88 » Tue Oct 21, 2014 10:44 am

cvoinescu wrote:It's the same, conceptually.

You set the coordinates for the G54 coordinate system using G10 L2 P1 (if you know the offset from the machine coordinates) or G10 L20 P1 (relative to the current position, which is what you describe). For example, you jog to the corner of the block, and issue G10 L20 P1 X0 Y0 Z0, which sets the current position as (0, 0, 0) in the G54 coordinate system. Replace P1 with P2, P3 etc. to set G55, G56 etc. Note that G10 does not also switch to the respective coordinate system; you still need G54, G55 etc. to switch. The machine starts in the G54 work coordinate system by default.

Your GUI may or may not have an interface element for G10 L20, but even if it doesn't, it should be easy enough to type the command.

A confusing factor is that G53 (machine coordinates) works differently from the others: it does not "stick" (it's not modal). It applies only to the command on the same line as it; for the next command, the machine reverts to whatever work coordinate system it had (G54 etc). G53 is useful when dealing with things that are at fixed positions on the machine, such as a tool changer, a pen wipe pad, and so on.

Ok that makes sense and is pretty similar to what the guys in our shop do on the Haas. Except they don't enter G10 L2 P1. They simply push a button. I guess the button issues the code.

aldenhart
Posts: 132
Joined: Tue Apr 10, 2012 2:17 pm

Re: Does TinyG support G53

Post by aldenhart » Tue Oct 21, 2014 11:10 am

We do try to check in pretty often. The whole conversation so far looks correct. Except that TinyG does not currently support G10 L20. That's on the list. You need to use G10 L2.

ALso a clarification on the use of G28.3. It can be used as described above, but it's also for machines that have infinite axes, like the Othermachine Othercutter. There is a pinch roller for feeding cardboard in the Y dimension. The user sets the card board in then the program issues the G28.3 y0 to set the zero in Y.

Post Reply