Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: shippman on December 09, 2008, 08:47:58 PM
-
I've looked all thru this forum at all of the suggested ways to make a macro pause and I have not found the one that works for me... here goes
In a button script, I'm trying to move the spindle to a given point to zero X & Y, then run M6 to change the tool & zero Z and then perform some Gcode. Everything works as expected except the script does not pause to allow me to zero Z after the tool change.
Sub Main()
My script has a routine that allows me to jog to a point and zero X & Y (this parts works) then
XDist = GetUserDRO(1152)
Code "m06 T20"
Code "M03"
Code "S21000"
Code "G4 P2"
Code "G00x0.0000y0.000z.7500"
Code "G01z-.3125F10.0"
Code "G01x"XDist""
Code "G01x0.0000F30.0"
Code "G01z.7500"
Code "M05"
End Sub
The M6 sets the tool # in the proper box on the screen and the "Change tool" LED flashes green and red as it does when run in Gcode. I just can't get it to pause so I can do the "Auto Tool Zero" button.
Any suggestions? I have tried SystemWaitFor(Start) with no results.
-
Would it not work as you want it to if you insert your auto tool zero script starting at the approiate line in your macro?
Brett
-
m1 ?
or in general config you can setup M6
-
What are you trying to achieve here, there is no way to pause a macro mid execution and press buttons to execute more VB.
Why do you need to zero out positions and tools in a running program.
If you can tell us what the reason is for this we may be able to sort it for you.
Graham