Hello Guest it is April 18, 2024, 09:35:33 PM

Author Topic: Work offset question G59p#  (Read 5078 times)

0 Members and 1 Guest are viewing this topic.

Work offset question G59p#
« on: October 10, 2007, 12:29:09 PM »
Hi everyone,

I am using a 10 up jig to machine parts and have the gcode set up to use offsets and call a subroutine to cut the part at the G59 P# location.

The problem I am having, is when setting up the job, the jig has 10 locations (2 rows of 5). Z is all at the same level.
I set the datum to the lower lefthand location but this sets the remaining 9  positions someway from where they should be ?
Or I can get things to line up but the Z is off.

I'm sure its something dumb I am doing.

G59P1 is my reference and the positions P12 - 20 are the other jig locations.
Should I be using a diferent G59 reference start point?

I use the other work offset locations for another jig, Im having the same problem with that. That program has 10 positions but also 4 tool changes so I have call each of the subroutines 10 times per tool, so I only have 4 tool changes instead of 40.

So the question is how do I reference the job (first location) so the remaining are machined in the correct location and Z.
(now preparing mayself to look like a stupid donkey ;D)

Thanks
Derek.

Code is below.

%
N100 G00 G17 G21 G40 G49 G80 G90
N110 T1 M06 G43 L1 (10MM slot drill)
N132 G00 Z10.S750 M03
N133 G00 X0 Y0
N134 G59 P1
N135 M98 P1
N136 G59 P12
N137 M98 P1
N138 G59 P13
N139 M98 P1
N140 G59 P14
N141 M98 P1
N142 G59 P15
N143 M98 P1
G68 A0 B0 R180 (Rotate back row ref 0,0 and 180 deg)
N144 G59 P16
N145 M98 P1
N146 G59 P17
N147 M98 P1
N148 G59 P18
N149 M98 P1
N150 G59 P19
N151 M98 P1
N152 G59 P20
N153 M98 P1
N153 M05
N154 G59 P1
N155 G00 Z20
N156 G00 X0 Y0
N157 G90 G69 (cancel coordinate rotation)
N158 M30

O1
N4 G00 Z5.
N5 G00 X0. Y2.475 S800 M05
N6 Z3. S875
N7 G01 Z-4. F45. (Set depth of pockets here rough)
N8 X-1.008 Y1.956 F75.
N9 G03 X-2.2 Y0. R2.2
Gcode cut out here to keep message small !
N33 X-2.122 Y7.921
N35 G01 Z-4. F45. (Set depth of pockets here finish)
N36 X-2.728 Y7.256 F75.
Gecode cut out here to keep message small !
N50 G01 Z-3. F150.
N640 G00 Z5.
N645 M99
%
You can "chop it off" but can't "chop it on"

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Work offset question G59p#
« Reply #1 on: October 10, 2007, 02:14:10 PM »
Hi Derek

When you say it is someway off, how far off and in X, or X and Y or what?

What have you got in the work offset table for G59 P12 to 20?

Graham.
Without engineers the world stops
Re: Work offset question G59p#
« Reply #2 on: October 10, 2007, 03:49:01 PM »
Hi Graham,

The first position can be 50 to 150mm off in x&y, not sure about z.

Figures in the workoffset table are 0,0  35,0   70,0   105,0   140,0   140, 35   105,35  70,35  35,35  0,35
These coordinates match the jig pocket coordinates.

I set 0,0,0 on the first workoffset location, but then the coordinates in the tool table for the first location have a strange offset of x52.123, y102,437 for eg and then is a fight to get the first reference correct.

Image of tool path below.
Its a steep learning curve at the moment, thanks for any help you can give.
 Derek

     
You can "chop it off" but can't "chop it on"

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Work offset question G59p#
« Reply #3 on: October 10, 2007, 06:24:26 PM »
Hi Derek,

I think you have misunderstood how the work offsets work.

G59 is the location of your x, y & z datum in relation to zero return.

G59 P12 to P20 is also the location of your 2nd to 10th x, y & z datum in relation to zero return.

So if your first part is at X-100 Y-100 Z-50 your second (G59 P12) part will be at X-135 Y-100 Z-50, your third (G59 P13) part at X-170 Y-100 Z-50 Etc.

If you want to make life a bit easier you can use G52 in your programs.  That way you only set one datum (G54) this will be the X,Y & Z distance from zero return to the datum point on the first part.

The G52 lines are the distance from the datum point on the first part.

Your program would then look like this :-

%
N1 G54
N100 G00 G17 G21 G40 G49 G80 G90
N110 T1 M06 G43 L1 (10MM slot drill)
N132 G00 Z10.S750 M03
N133 G00 X0 Y0
N135 M98 P1
N136 G52 X35.
N137 M98 P1
N1137 G52 X0
N138 G52 X70.
N139 M98 P1
N140 G52 X0
N1140 G52 X105.

N141 M98 P1
N142 G52 X0
Etc....

A G52 with a value of 0 (zero) cancels the shift, this must be done before you change to another value. You must also cancel any G52's before a tool change move or change of fixture (G55,G56 etc)

By the way,  Mach3 will not draw it correctly on the screen, don't worry it will cut correctly.

I hope this helps

Graham.

« Last Edit: October 10, 2007, 06:28:05 PM by Graham Waterworth »
Without engineers the world stops
Re: Work offset question G59p#
« Reply #4 on: October 10, 2007, 09:19:15 PM »
Hi Graham,

Its sort of sinking in  . .slowly . .(Cranium thickus  :-[)
I was setting zero by touching the job at the first pocket location and using the dro set 0,0,0
expecting the other pockets G59 P12 -P20 to be referenced to that.

Is the problem that G59 P# are  all referenced to the machine 0,0,0? and when I set the first location G54 (G59 P1) it's offset is some arbitrary number away from the machine 0,0,0 (at the mo I'm not using limit switches to home the m/c) and the other pockets are set at the exact values in the table.
Its dificult to understand how the various coordinate systems work together.

I like the idea of G52, its easier to see what is happening, I'd still like to understand the workoffsets
using G59, but for now its better to learn how to crawl before trying to walk !

Thanks for your help
Kind regards
Derek.
You can "chop it off" but can't "chop it on"

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Work offset question G59p#
« Reply #5 on: October 11, 2007, 04:04:52 AM »
Hi Derek,

All work offsets G54 - G59 P1-254) are an X, Y & Z distance from your home position.

Working your way you would have to set every datum (G59 P12 to P20) each time you reset the jig.

Using G52 you only set one datum and the program knows where the others are. You can also correct any errors in the jig positions by juggling the G52 figures.

Not only that, but if you fit home switches and tenon your jig to the table you can go back to that point at any time.

Graham.
Without engineers the world stops