Hello Guest it is April 24, 2024, 10:15:59 AM

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

0 Members and 1 Guest are viewing this topic.

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: reset home with G code
« Reply #10 on: July 07, 2008, 02:59:38 PM »
Hi,

G28 x0 y0 z0 sends the machine to a known home position, e.g. the machine has already been homed before.

G28.1 x0 y0 z0 will send the machine to find the home position whether its been there before or not.

Graham.
Without engineers the world stops
Re: reset home with G code
« Reply #11 on: July 07, 2008, 05:01:43 PM »
Thats awesome!!!
Re: reset home with G code
« Reply #12 on: July 07, 2008, 09:36:09 PM »
Okay guys,
Setup for a program at X8.00 Y7.00 Z-1.35 zero all as you would for a work offset. Then crank on your drives to intentionally loose position drastically. Executing the above G28.1 X0Y0Z0 send the machine to zero it's axis but does not reset the offset but corrects it!!! How cool is that!!! Touches off all homes and finishes with X-8.00 Y-7.00 Z1.35, brilliant, it's going into the post processor.

Only issue is the order executed is not Z axis first, but I can easily work with that, maybe as simply as execute a G28.1 Z0 followed by g28.1 x0y0. I'll have more time to play tomorrow. Hey, maybe a G28.1 Z0 Y0 X0... Graham, thanks so much!

Chip and ger21, thank you both as well!!! I will start playing with macros soon as well.

Thanks again to all,
Sam

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: reset home with G code
« Reply #13 on: July 07, 2008, 09:51:38 PM »
Only issue is the order executed is not Z axis first, but I can easily work with that, maybe as simply as execute a G28.1 Z0 followed by g28.1 x0y0.

I think that's the way to go.
Gerry

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

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

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: reset home with G code
« Reply #14 on: July 08, 2008, 04:03:41 AM »
Thats awesome!!!

Another little known gem out in the open  ;D

Graham.
Without engineers the world stops
Re: reset home with G code
« Reply #15 on: December 16, 2008, 07:38:51 PM »
Hi All,

I found this little gem. I have tried adding G28.1 A0 after a cycle of a specific cut before moving on to the next as a way of picking up of lost steps by referencing the A axis. I have found that the program stalls/stops at the addition of this code.

Is there somthing I have missed?

vmax549

*
Re: reset home with G code
« Reply #16 on: December 16, 2008, 08:09:32 PM »
yOU can use G28.1 X#.## . Y#.## Z#.##  to reference the axis to the home switches. BUT it follows the fanuc convention of going by way of a waypoint(can be the present point) BUT it then makes an interpolated 3 axis move to the approx home switch positions then references the switches. It is the fastest way to ref home, Just make sure the path is clear(;-)

IF you want it to do exactly like the Ref all home  where it refs Z then X then Y  then you will need to create a macro that calls the "Ref all home" button.

Let us know if you need help with it, (;-) TP
« Last Edit: December 16, 2008, 08:14:37 PM by vmax549 »
Re: reset home with G code
« Reply #17 on: December 16, 2008, 10:10:59 PM »
Thanks TP

I only wish to reference the A axis.

Yes it would be great to have a macro and use M codes throughout the code.

I have never written a macro so I would certainly like some help

C

vmax549

*
Re: reset home with G code
« Reply #18 on: December 17, 2008, 09:21:22 PM »
G28.1 A0     will reference A axis to the home switch by way of A0.000 If that is not what you need email me and I will send you a macro to ref A axis.

OR now is a good time to build your own Mcode(;-)

From the main screen at the top select the pulldown menu"Operator" then VB script editor. IF a file is loaded on the screen then from the editor select file, close. This will leave a blank page to work on. Type in the phrase   DoButton(25)

Save the file as M1001( you can use any number 1000 and up safely). Make sure it saves to the c:\mach3\macros directory (;-)

Close the editor

Go to the MDI screen and type in M1001 and the A axis should reference HOME from its present location .

NOTE : You do have to have a home switch installed on A(;-) for this to work.

If all is well then you have created a Mcode that you can call from a gcode program at any time you need.

NOTE: Make sure that you program the Z to a clear safe position before calling the M1001 (;-)


Hope that helps, (;-) TP
« Last Edit: December 17, 2008, 09:42:02 PM by vmax549 »
Re: reset home with G code
« Reply #19 on: December 17, 2008, 10:04:55 PM »
Thanks TP,

I have sent you an email