Hello Guest it is April 19, 2024, 07:07:35 AM

Author Topic: G54-G59 Work offsets  (Read 53011 times)

0 Members and 1 Guest are viewing this topic.

Offline TT350

*
  •  113 113
    • View Profile
G54-G59 Work offsets
« on: December 11, 2007, 10:35:52 PM »
I am into my 6th month using Mach and have come a long way
 
My question is how do you set up multiples of the same part in Mach?
 
I know how to setup tool offsets and I see the G54-G59 on the offsets page.
 
If G54 is your first part X0 Y0 then G55 must be your next part Wright?
 
 
Attached is a simple hole pattern with two hole.

G00 G43 G40.1 G17 G80 G50 G90
G20
(Deep Drill )
M6 T1
G43 H1
M03 S800
G00 Z0.2655
X0.6250 Y-0.7500
G73 X0.6250 Y-0.7500 Z-0.4595 R0.0 Q0.05 F2.0
G80
G00 Z0.2655
X4.8150 Y-0.7500
G73 X4.8150 Y-0.7500 Z-0.4595 R0.0 Q0.05 F2.0
G80
G00 Z0.2655
G00 Z1
M5 M9
M30

 
Let’s say I have two parts using this pattern and part # 1 is
X0 Y0 and part # 2 is X-5.0 Y0 What would my code look like.
 
Where in the code would the G54-G55 be placed?
 
If you don't mind would you edit my code as an example.
 
Thanks
 
Chris 

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: G54-G59 Work offsets
« Reply #1 on: December 12, 2007, 06:52:21 AM »
Hi Chris,

G54 to 59 are machine datums, you use them to set fixture xyz zero points.  To do multiple parts on a fixture you use local datums G52 :-

G00 G43 G40.1 G17 G80 G50 G90
G20
(Deep Drill )
G54 (set fixture offset before any moves)
M6 T1
G43 H1
M03 S800
G00 Z0.2655
X0.6250 Y-0.7500
G73 Z-0.4595 R0.0 Q0.05 F2.0
G80
G00 Z0.2655
G52 X-5. (set local datum offset)
X4.8150 Y-0.7500
G73 Z-0.4595 R0.0 Q0.05 F2.0
G80
G52 X0 (you must always cancel)
G00 Z0.2655
G00 Z1
M5 M9
M30

Graham.
Without engineers the world stops

Offline TT350

*
  •  113 113
    • View Profile
Re: G54-G59 Work offsets
« Reply #2 on: December 12, 2007, 08:34:43 AM »
Hi Graham

You seperated the two hole with G54-52, the two hole are in one part mounted on a jig,
the jig has two parts on it that get the same operation.

Chris

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: G54-G59 Work offsets
« Reply #3 on: December 12, 2007, 10:00:17 AM »
OK, like this.

G00 G43 G40.1 G17 G80 G50 G90
G20
(Deep Drill )
G54 (set fixture offset before any moves)
M6 T1
G43 H1
M03 S800

G00 X0.6250 Y-0.7500
Z.2655
G73 Z-0.4595 R0.0 Q0.05 F2.0
X4.8150 Y-0.75
G80

G52 X-5.(SECOND PART)
G00 X0.6250 Y-0.7500
G73 Z-0.4595 R0.0 Q0.05 F2.0
X4.8150 Y-0.75
G80
G52 X0 (you must always cancel)
G00 Z1. M9
M5
M30

Graham.
Without engineers the world stops

Offline TT350

*
  •  113 113
    • View Profile
Re: G54-G59 Work offsets
« Reply #4 on: December 12, 2007, 10:17:13 AM »
G52 X0 (you must always cancel).............Please explain this for me!

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: G54-G59 Work offsets
« Reply #5 on: December 12, 2007, 10:26:54 AM »
G52 X0 Y0 Z0 A0 B0 C0

Cancels any G52 local offset you have set.

If you do not cancel them you will get accumulations of offset and things like go to tool change go to the wrong place. You do NOT want that.

Graham.
Without engineers the world stops

Offline TT350

*
  •  113 113
    • View Profile
Re: G54-G59 Work offsets
« Reply #6 on: December 13, 2007, 07:30:17 AM »
When I was looking at the offsets page I see G54-G59.
I was under the impression that G54 would be X0 Y0
or "master part" and G55-G59 would be your clone parts
with G55 having it's X/Y offset's,G56 having it's X/Y's
G57 having it's X/Y's and so-on.

How dose G52 play into this?

Please be a pashunt, I'm still new at this.

There's no holes in my table and I'm trying
to keep it that way! :)

Chris
« Last Edit: December 13, 2007, 07:31:59 AM by TT350 »

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: G54-G59 Work offsets
« Reply #7 on: December 13, 2007, 08:39:01 AM »
Hi Chris,

If you have a jig with 6 identical parts located on it, you do not want to have to set 6 lots of offsets.

G54 to G59 are global fixture offsets, that is, you can set each one up with a different fixture datum then when you use that fixture again you have to set all six datums again.  We do not want to do that we want to set one datum and all the other parts are in known locations so we can use 1 global and any number of local datums in this case 6.

To program each location on the fixture you use G52, this is a local datum that is relative to the fixture offset in use.

So, we set the fixture datum using G54, then in our program we have G52's that represent the positions of the individual parts on the fixture, these are hard coded into the program as they never change.

This program would drill the 2 holes in each part in the diagram below. Every time we would use this fixture we would set G54 X0 Y0 at the bottom left side and the Z on top of the job and the program sets all the local datums as it needs them.

Before anybody tells me :-

If I wanted to make things even better I could use incremental or absolute subs or macros to make the program even smaller, but lets start simple.

%
(USE FIXTURE OFFSET G54)

G21 G40
T1 M6
G54 G00 G90 G43 X0 Y0 Z25. H1 S750 M3 (MOVE TO FIXTURE DATUM)
(FIXTURE LOCATION 1)
G52 X20. Y20.                                        (SET FIRST LOCAL DATUM)
G00 X-5. Y0                                          (MOVE TO FIRST HOLE)
G81 Z-10. R1. F125.                                 (DRILL FIRST HOLE)
X5.                                                       (DRILL SECOND HOLE)
G80                                                        (CANCEL DRILLING)
G52 X0 Y0                                               (CANCEL LOCAL DATUM)

(FIXTURE LOCATION 2)
G52 X50. Y20.
G00 X-5. Y0
G81 Z-10. R1. F125.
X5.
G80
G52 X0 Y0

(FIXTURE LOCATION 3)
G52 X80. Y20.
G00 X-5. Y0
G81 Z-10. R1. F125.
X5.
G80
G52 X0 Y0

(FIXTURE LOCATION 4)
G52 X80. Y50.
G00 X5. Y0
G81 Z-10. R1. F125.
X-5.
G80
G52 X0 Y0

(FIXTURE LOCATION 5)
G52 X50. Y50.
G00 X5. Y0
G81 Z-10. R1. F125.
X-5.
G80
G52 X0 Y0

(FIXTURE LOCATION 6)
G52 X20. Y50.
G00 X5. Y0
G81 Z-10. R1. F125.
X-5.
G80
G52 X0 Y0
M5
M30
%

I hope this makes things a bit clearer.

Graham.
« Last Edit: March 02, 2015, 02:30:15 PM by Graham Waterworth »
Without engineers the world stops

Offline TT350

*
  •  113 113
    • View Profile
Re: G54-G59 Work offsets
« Reply #8 on: December 13, 2007, 08:51:41 AM »
Graham, thanks so much for your time!!!

I will play with this and cut some air.


Chris

Offline TT350

*
  •  113 113
    • View Profile
Re: G54-G59 Work offsets
« Reply #9 on: December 13, 2007, 08:42:55 PM »
So let me see if I understand this.

The G54-59 are for jig/fixture and the G52'S are for the parts mounted to
the jig/fixture.

Chris