Hello Guest it is April 25, 2024, 08:30:38 AM

Author Topic: reset home with G code  (Read 38109 times)

0 Members and 3 Guests are viewing this topic.

reset home with G code
« on: July 06, 2008, 08:16:09 PM »
Hello all,
I'm a newbie to Mach 3 but have been very impressed. I am a toolmaker, and have some experience with CNC mills and lathes. So far Mach 3 has been awsome, love being able to tailor everything.

I recently started working on building a 4x4x3' hot wire machine and also purchased a 2x1'x4" router. Programming is being done with Featurecam and/or Mastercam as these are what we use at work. So far there is one thing I would like to do that I cannot figure out...

How can I make the machines reset home position after every run? I would like this to be done with a G-code command that I can just put into the post.

Thanks,
Sam

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: reset home with G code
« Reply #1 on: July 06, 2008, 09:04:40 PM »
Hi, Sam

Put 

G00 Z0
G00 X0 Y0
M30

Before the M30 in your G-code files should do it.

Chip

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: reset home with G code
« Reply #2 on: July 06, 2008, 10:24:41 PM »
G00 Z1 might be better.

However, if you want the machine to actually home to home switches, use G28.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: reset home with G code
« Reply #3 on: July 06, 2008, 10:29:55 PM »
Thanks Chip,
Maybe I wasn't very clear, I am not trying to return to current machine zeros. I would like to have it reset zero, or home the axis. Ahh, let me see, okay, "ref all home" is the button that I would like to be auto pressed by calling a code.
Pretty sure what you suggested is a G28, assuming home position being zeros.

I would like to know if there is a way to reference all homes at the end of a program automatically. If not already in Mach3, is it possible to create a macro thing? I don't know anything about macros, but if needed I'll learn. I can see myself calling on something like this even throughout a program just to keep everything honest.

Thanks again for the help!
Sam

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: reset home with G code
« Reply #4 on: July 06, 2008, 11:09:00 PM »
G28 will home the machine, and if you add coordinates to the G28, it'll rapid to those coordinates before homing.

G28 X1 Y1
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: reset home with G code
« Reply #5 on: July 07, 2008, 01:13:59 AM »
Hi, Sam

If I understand, Your code finishes X## Y## Z## and you want to Zero the DRO's at there current position with G-code or M-code. ?

The attached Macro, M2500.M1S will do this for you.

You need to put it in your Macro folder for the Profile your loaded at startup. Example: C:\Mach3Mill\Macros\Mach3Mill.

Add the M2500 in as below, In your G-code file.

N255  X2.0380  Y1.1590   
N260 G0  Z1.0000
M2500
M30
%

It can be changed as needed, It's just some DoOEMButton,s 1010, 1009, 1008, z,y,x, Same as Pushing the Zero X,Y,Z, Buttons.

Let Us Now, Chip
« Last Edit: July 07, 2008, 01:35:44 AM by Chip »
Re: reset home with G code
« Reply #6 on: July 07, 2008, 09:15:11 AM »
Okay now I'm getting confused. I thought G28 would send the machine to the taught home, usually 0,0,0 for me. I would like to teach the machine it's home by touching off the limits with the G/M-code, so that at a tool change or during a long run it can check up on itself, atleast after each run. I'm not at the machine right now, but I thought that is what "ref all home" was doing for me, now I cannot be sure. Am I all messed up here??? Also wondering if it is possible to do this in program or will it freak things out.

Maybe I can free up some time today at work and study up on macros and look at the one you provided. If not I'll get to it tonight.

Thanks again,
Sam

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: reset home with G code
« Reply #7 on: July 07, 2008, 10:31:15 AM »
Hi, Sam

It's now a little clearer, Ref All Home will reset your Dro's to zero, I think a Macro to send to home position might work.

I'll think on it, Maybe someone will comment further.

Thanks, Chip 

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: reset home with G code
« Reply #8 on: July 07, 2008, 10:39:56 AM »
Just read the manual's section on G28, it should explain it for you.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: reset home with G code
« Reply #9 on: July 07, 2008, 01:06:08 PM »
Section 5.6.1.4 right.?. I'm reading...
Reads (to me) that commanding a G28 will return the machine to the G28 location as defined in the "Motor Home/Softlimits" (5.6.1.1 in the manual).

I think Chip is following me now, sorry I cannot explain better.

thanks,
Sam