Hello Guest it is April 23, 2024, 09:50:16 PM

Author Topic: Another "M6 in a macro not pausing" problem - sorry  (Read 4132 times)

0 Members and 1 Guest are viewing this topic.

Another "M6 in a macro not pausing" problem - sorry
« 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.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Another "M6 in a macro not pausing" problem - sorry
« Reply #1 on: December 09, 2008, 09:28:37 PM »
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
;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!

Offline Repmo

*
  •  54 54
    • View Profile
Re: Another "M6 in a macro not pausing" problem - sorry
« Reply #2 on: December 14, 2008, 09:28:52 AM »
m1 ?

or in general config you can setup M6

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Another "M6 in a macro not pausing" problem - sorry
« Reply #3 on: December 15, 2008, 03:18:46 PM »
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
Without engineers the world stops