Hello Guest it is March 28, 2024, 07:21:34 PM

Author Topic: changing offsets and keeping z value?  (Read 5193 times)

0 Members and 1 Guest are viewing this topic.

changing offsets and keeping z value?
« on: March 15, 2007, 03:29:33 PM »
Is it possible to change offsets and transfer the z value from the previous offset.  For example, if I'm in offset 25 and Z=1, I'd like to switch to offset 26 and have z =1 regardless of what value happens to be stored in offset 26 for Z.
Thanks
Eugene

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: changing offsets and keeping z value?
« Reply #1 on: March 15, 2007, 07:39:03 PM »
If you are not changing tool, the only way you can do that safely is by having the same z value in both offsets.

What are you trying to do?

Graham.
Without engineers the world stops
Re: changing offsets and keeping z value?
« Reply #2 on: March 15, 2007, 09:33:15 PM »
Hi Graham,
It's the tool change that makes it a hassle.  I have 4 boards mounted on the table, each with its own offset location.  Each board will be cut identically.  I've tried to use one offset and then use g52 to locate the other 3 boards, the only problem is that the file(s) for  each board contain their own g52 offsets to locate 8 parts within the board.  G52's within a g52 doesn't work out right.
For now, what I've been doing is whenever I change a bit and rezero it, I go in and set the z value the same for each offset.  It works, but I'm concerned that one time I'll forget to update all the offsets after a bit change.
Any ideas?
Thanks

Offline GaryB

*
  •  108 108
    • View Profile
Re: changing offsets and keeping z value?
« Reply #3 on: March 15, 2007, 09:56:48 PM »
Eugene, I've been doing the same thing, at the start of  a run I set up my offsets, run my touch off then go to each offset and set it to 1.0000 and I'm good to go.

Missed setting one offset once..........cut my vacuum pod in half before I could stop it so if you find a better solution for this one I'm all ears......
Gary
Beckwith Decor Products
ArtCam Trainer
Onsrud & Custom CNC tooling Distributor

Wichita/Derby Kansas
http://www.beckwithdecor.com
Re: changing offsets and keeping z value?
« Reply #4 on: March 16, 2007, 12:40:29 AM »
Gary,  I think I just figured out a way to do this.  I created 2 simple macros which can be inserted in your code:

;M110 -- can be any available macro number

Code "G0 Z1"
SetOEMDro (1110,GetOEMDro (49))      ;oemdro 1110 is a temp. location for storing the current z

;M111

SetOEMDro (49, GetOEMDro (1110))     ;oemdro 49 is the z offset dro found on the offset page

In your code you need to insert macro M110 right after a tool change/rezero and insert the following when changing offsets:
G0 Z1
G59 P25     ;your new offset #
M111

 I did some simple tests and it seems to work.  I'll know for sure tomorrow morning.

« Last Edit: March 16, 2007, 12:56:19 AM by watswood »

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: changing offsets and keeping z value?
« Reply #5 on: March 16, 2007, 04:49:16 AM »
You are going about this the wrong way.

In Mach you have 6 global datums and 1 local datum, the global datums are G54,G55,G56,G57,G58 & G59 the local one is G52.

If you have 4 boards to you can set each with its own global datum.

The boards can be in any position on the table and they don,t have to be at the same height  e.g. different vices.

You set your datums for each block at the same point then the code you have will work if you add the G54 or G55 into the code in the correct place.

You set the tool offsets as if you are working on one part.

The code is like this :-

G21 G40 G80 G17


N1 (TOOL 1 ROUGH MILL)
T1 M6
G54 G00 G90 G43 X0 Y0 Z25. S1000 M3
Z1. M8
G52 X10.Y5.
X1.
Y3.
G52 X0 Y0
etc.

G55 X0 Y0 Z25.
Z1 M8
G52 X10.Y5.
X1.
Y3.
G52 X0 Y0
etc.

G56 X0 Y0 Z25.
Z1 M8
G52 X10.Y5.
X1.
Y3.
G52 X0 Y0
etc.

G57 X0 Y0 Z25.
Z1 M8
G52 X10.Y5.
X1.
Y3.
G52 X0 Y0
etc.
G91 G28 Z0 M6
M1


N2 (TOOL 2 FINISH MILL)
T2 M6
G54 G00 G90 G43 X0 Y0 Z25. S1500 M3
Z1. M8
G52 X10.Y5.
X1.
Y3.
G52 X0 Y0
etc.

G55 X0 Y0 Z25.
Z1 M8
G52 X10.Y5.
X1.
Y3.
G52 X0 Y0
etc.

G56 X0 Y0 Z25.
Z1 M8
G52 X10.Y5.
X1.
Y3.
G52 X0 Y0
etc.

G57 X0 Y0 Z25.
Z1 M8
G52 X10.Y5.
X1.
Y3.
G52 X0 Y0
etc.
G91 G28 Z0 M6
M30

Graham.
Without engineers the world stops
Re: changing offsets and keeping z value?
« Reply #6 on: March 16, 2007, 11:09:47 AM »
Graham,
I'm fairly new to gcode and mach and may need to do some research into tool changes/offsets, which is something I have not yet used.  The problem for me is that I do not have a tool changer and everytime I change a tool the z offset for that tool may be off by .05" or so depending on where I happen to chuck it.  The bit is then rezeroed to the top of the material and a new z offset is created(in whatever work offset I happen to be in).   I'm guessing, but this would mean that I would have to manually enter the z offset somewhere, and the word "manual" is what I'm trying to eliminate.  Let me do some looking into tool changes and tool offsets and see what I can figure out.  Thanks.

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: changing offsets and keeping z value?
« Reply #7 on: March 16, 2007, 03:27:24 PM »
It sound as if you should be looking at something like this:-

http://www.coventrytoolholders.co.uk/pdfs/page103.pdf

Graham.
Without engineers the world stops