Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: XYTable on August 27, 2008, 07:47:16 PM

Title: Simple Zero VB script runs in VB but dose nothing in my G-Code...
Post by: XYTable on August 27, 2008, 07:47:16 PM
I have made a very simple script to call button 1007 so that it will automatically Zero my program co-ords during my g-code. The problem is that when i call it from the VB editor it works fine, but just skips over it in the G-code when i call it. Any help would be great!

VB script:
Sub ZeroAll()
           DoOEMButton(1007)
End Sub

I saved it as M650.m1s M999.m1s and a bunch of other to see if it worked and same thing. All im doing to call it is typing the M650 or M999 into my g-code script. Is this correct?

Thanks!
Title: Re: Simple Zero VB script runs in VB but dose nothing in my G-Code...
Post by: jimpinder on August 28, 2008, 05:08:10 AM
Where did you save it - it needs to be in the Macros folder - then Mach 3 turn or Mach3 mill - whichever.
Title: Re: Simple Zero VB script runs in VB but dose nothing in my G-Code...
Post by: Hood on August 28, 2008, 05:44:12 AM

I have a very similar macro on my coil winder for zeroing the A Axis, If I call M2222 it will zero my A axis and it works well. The macro is in the macro folder and I called it M2222
Hood