Hello Guest it is April 19, 2019, 07:09:00 AM

Author Topic: How to use G28.1 on Mach4?  (Read 1991 times)

0 Members and 1 Guest are viewing this topic.

How to use G28.1 on Mach4?
« on: October 20, 2017, 03:37:24 AM »
Hello. I was looking on Google how G28.1 works, tried on my side, it does not work. Unknown G code used, it says. Basically i am trying now as MDI, but would like to put that inside gcode. Thank you.
Re: How to use G28.1 on Mach4?
« Reply #1 on: October 20, 2017, 03:56:02 AM »
Re: How to use G28.1 on Mach4?
« Reply #2 on: October 20, 2017, 08:41:05 AM »
This is a good video to watch. 

https://youtu.be/Rd-h0YA9IzQ

But as far as using G28. 
Fusion 360 outputs the following code to send the machine to zero.

G28 G91 Z0
G28 X0 Y0
M30
Chad Byrd
Re: How to use G28.1 on Mach4?
« Reply #3 on: October 20, 2017, 08:44:39 AM »
Yes, i know that G28 does that. But i want to do "Ref-all-home" in the Gcode.
Re: How to use G28.1 on Mach4?
« Reply #4 on: October 20, 2017, 02:51:10 PM »
Hi zarsss,
there is no 'Ref All Home' instruction in G code. Mach4 has a function like that or you could code your own if you wanted something a bit special.

You would have a macro, m100, for instance, and in that macro there would be a call to Machs 'Ref All Home' function or other Lua code of your choice.
Whenever you want to 'Ref All Home' in G code you'd write m100....easy!

Craig
My wife left with my best friend...
     and I miss him!

Offline DazTheGas

*
  •  744 744
  • DazTheGas
    • View Profile
Re: How to use G28.1 on Mach4?
« Reply #5 on: October 20, 2017, 03:09:01 PM »
Off the top of my head as not near machine at moment but I kind of remember me and Andy from Warp9 trying this and refallhome not working whilst gcode is running as a safety measure.

DazTheGas
Theres always time for a choccy biccy
Re: How to use G28.1 on Mach4?
« Reply #6 on: October 20, 2017, 03:22:35 PM »
Hi,
I've just been trying it and I think Daz has it right. Could still make your own code or try to dig out the safety feature.

Craig
My wife left with my best friend...
     and I miss him!
Re: How to use G28.1 on Mach4?
« Reply #7 on: October 21, 2017, 02:52:57 PM »
Hi zarsss,
what exactly do you want to do?

'Ref All Home' drives each axis in turn until the home switch goes active. Is that what you wish? Or do you just want the axis to drive to machine co-ord
zero for that axis? There is a world of difference between the two. Secondly do you wish the machine co-ords to be set to zero or your nominated offset
when its gets there as would normally occur when referencing an axis?

Mach4s API gives you some very powerful instructions and any and all of the alternatives above can be done no trouble. If you can tell me exactly what you
need maybe I can help you code it.

Craig
My wife left with my best friend...
     and I miss him!
Re: How to use G28.1 on Mach4?
« Reply #8 on: October 27, 2017, 07:25:40 AM »
Hello. Sorry, been bit busy this week. As we are doing three different parts on the same machine bed, i would like to add ref all home to g-code, just to be sure no steps been skipped, and then offset to be added by G92. As machining should be quite tolerant and no money yet for closed loop steppers.

Offline Chaoticone

*
  • *
  •  5,472 5,472
  • Precision Chaos
    • View Profile
Re: How to use G28.1 on Mach4?
« Reply #9 on: October 27, 2017, 09:09:08 AM »
G28.1 is not mentioned in the Mach4 Gcode manual. Mach3 and Mach4 are totally different and that means for a good bit of the Gcode too.

Yup, sounds like a custom m code added to the end of program to reference the machine would be the way to go.

If the machine is getting out of position between runs you have other issues to address. A properly designed stepper system doesn't loose position either. Sounds like your looking for a temporary fix for a permanent problem.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!