Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 02:36:44 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Another "M6 in a macro not pausing" problem - sorry
Pages: 1   Go Down
Print
Author Topic: Another "M6 in a macro not pausing" problem - sorry  (Read 1078 times)
0 Members and 2 Guests are viewing this topic.
shippman
Active Member

Offline Offline

Posts: 5


View Profile
« 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.

Logged
Chaoticone
South Carolina, US
Administrator
*
Offline Offline

Posts: 3,598


Precision Chaos



View Profile WWW
« 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
Logged

Grin If you could see the things I have in my head, you would be laughing too. Grin
www.precisionchaos1.com
My guard dog is not what you need to worry about!
Repmo
Active Member

Offline Offline

Posts: 54



View Profile
« Reply #2 on: December 14, 2008, 09:28:52 AM »

m1 ?

or in general config you can setup M6
Logged
Graham Waterworth
Administrator
*
Online Online

Posts: 1,665


West Yorkshire, England



View Profile WWW
« 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
Logged

G-Code is on the cutting edge

Autovalues Engineering, CNC machining specialists, Bradford, England
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!