Home
Downloads
Mach and LazyCam
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
German Forum
Italian Forum
Portugese Forum
Resources
Links
User Reviews
User Videos
Contact Us
CNCZone
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
December 02, 2008, 09:34:51 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
VB and the development of wizards
Stop a macro several times with M01 and/or SystemWaitFor (Start)
Pages:
1
Go Down
« previous
next »
Author
Topic: Stop a macro several times with M01 and/or SystemWaitFor (Start) (Read 699 times)
0 Members and 1 Guest are viewing this topic.
FrankL
Active Member
Offline
Posts: 3
Stop a macro several times with M01 and/or SystemWaitFor (Start)
«
on:
July 10, 2008, 12:23:51 AM »
Hi,
I have been looking at various posts regarding this, but I just can't find why the following code is not running correctly no matter how the "Stop on M1 command" is set in the General Config panel or if I use the button on the main screen.
In the code below, the 1st M01 command is ignored and the 3rd pause is not working at all. If I comment out the 1st M01 and use the 1st SystemWait, then I can stop on the 1st pause but then the second / 3rd pauses are ignored.
Any idea on why and how to get this to work ?
Thank you
(I'm running Mach3 v3.041 on XP)
=============
Sub Main()
'Test Stop on M01
Code "M01" 'sets a machine pause
Code "(Press Start to continue - 1)" 'this goes in the status bar
'SystemWaitFor (Start)
'Code "M01" 'sets a machine pause
Code "(Press Start to continue - 2)" 'this goes in the status bar
SystemWaitFor (Start)
Code "M01" 'sets a machine pause
Code "(Press Start to continue - 3)" 'this goes in the status bar
'SystemWaitFor (Start)
Code "(End)" 'this goes in the status bar
End Sub
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 770
Briceville, TN, USA
Re: Stop a macro several times with M01 and/or SystemWaitFor (Start)
«
Reply #1 on:
July 10, 2008, 09:24:12 PM »
Here is your code.
SystemWaitFor, only works for REAL inputs, so your gonna have to bring in a true input.
here is the code:
Sub Main()
'Test Stop on M01
ReStart = IsActive(INPUT4) 'this is input signal 4
DoOEMButton(1001) 'sets a machine pause
Message("Press Start to continue - 1") 'this goes in the status bar
SystemWaitFor (ReStart)
DoOEMButton(1001) 'sets a machine pause
Message("Press Start to continue - 2") 'this goes in the status bar
SystemWaitFor (ReStart)
DoOEMButton(1001) 'sets a machine pause
Message("Press Start to continue - 3") 'this goes in the status bar
SystemWaitFor (ReStart)
Message("End") 'this goes in the status bar
End Sub
Scott
Logged
All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
FrankL
Active Member
Offline
Posts: 3
Re: Stop a macro several times with M01 and/or SystemWaitFor (Start)
«
Reply #2 on:
July 11, 2008, 12:02:41 AM »
Hi Scott,
Thank you very much for your answer and the code.
I'm new to this but I thought SystemWaitFor (Start) was waiting for the main Start button. That's why I was trying this too. I understand now it's a variable and how that can be used.
But this is to be used in a m6End macro where I want to stop several times and display an operator message. And no real input is available (one could be made available with a manual switch but I am already short in the nb of inputs with the HobbyProCNC board, so ...). And I really don't like the idea of having 2 different "Start" buttons.
So, how do I get M01 to stop and restart ? Or saying it differently, how do I pause (temporarily stop/resume) a macro operation several times and still/only use the main Start button ?
Thanks again for your help.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 770
Briceville, TN, USA
Re: Stop a macro several times with M01 and/or SystemWaitFor (Start)
«
Reply #3 on:
July 11, 2008, 01:17:19 AM »
you need to spell out what you want to happen, step by step, I dont understand what you want.........
m1 is already an optional stop/pause, and to start running again, you just hit the cycle start button.....
scott
Logged
All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
FrankL
Active Member
Offline
Posts: 3
Re: Stop a macro several times with M01 and/or SystemWaitFor (Start)
«
Reply #4 on:
July 11, 2008, 02:17:10 AM »
Thank you for your patience on this.
WITHIN the M6End.m1s process that I have up and running correctly (auto tool zero with a contact plate), I like to pause the macro several times and display operator messages like :
- now change tool, click Start when done
- now position plate and connect lead to bit, click Start when done
- now disconnect lead and remove plate, click Start when done
On this last Start, then the M6End macro would end and the tool returns to normal operation.
I have all the code that takes care of the X,Y,Z positions, before and after the tool change, up and running. I just can't stop and get the various messages out when I want while executing the M6End. So, how do I pause and restart (with the main Start button) within a macro
I hope it's clear.
Logged
Pages:
1
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*e*i*n*g
=> Mach Screens
=> Feature Requests
=> Non English Forums
=> FAQs
===> Finished Plugins for Download
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> Lazy Cam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> dspMC/IP motion controller
=> Third party software and hardware support forums.
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Promote and discuss your product .
=> Sieg Machines
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
=> One on one phone support.
=> Forum suggestions and report forum problems.
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
Loading...