Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portuguese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 24, 2013, 04:25:10 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
G-Code, CAD, and CAM
G-Code, CAD, and CAM discussions
How can I have a G-Code program load and run another G-Code program
Pages:
1
2
Go Down
« previous
next »
Author
Topic: How can I have a G-Code program load and run another G-Code program (Read 1272 times)
0 Members and 1 Guest are viewing this topic.
TomR
Active Member
Offline
Posts: 17
How can I have a G-Code program load and run another G-Code program
«
on:
April 26, 2012, 03:26:48 PM »
I have three (3) G-Code programs that I would like to run sequentially. Due to the length of each program, it would be desirable to have a snippet at the end of each program to call/load and run the next G-Code program upon its completion. Is this possible and could you provide a snippet that might accomplish this objective.
Thanks for your time, TomR
Logged
BR549
Active Member
Offline
Posts: 4,095
Re: How can I have a G-Code program load and run another G-Code program
«
Reply #1 on:
April 26, 2012, 04:44:36 PM »
FIrst you need to create a mcode(macro)
'M5001 Macro to run next program
LoadRun(C:\Mach3\Gcode\NameOfNextFile.txt")
The you insert the Mcode just before the M30 and use the block delete slash.
/ M5001
This way you can turn OFF the program transfer if needed using block delete.
Now where the 1st program ends it will LOAD AND RUN the called file automaticaly. IF you want it to load and wait for a start then use
,M5001 Macro to load file
LoadFile(C:\Mach3\Gcode\NextFileName.txt")
It will load the file and WAIT for you to press start.
FOR the 2nd file load use another macro M5002 cna call the next program as you did it the first.
(;-) TP
Logged
TomR
Active Member
Offline
Posts: 17
Re: How can I have a G-Code program load and run another G-Code program
«
Reply #2 on:
April 26, 2012, 05:09:43 PM »
BR549:
Thanks for your reply. I am going to give this a shot first thing tomorrow.
I really appreciate your help,
Regards, TomR
Logged
BR549
Active Member
Offline
Posts: 4,095
Re: How can I have a G-Code program load and run another G-Code program
«
Reply #3 on:
April 26, 2012, 06:18:45 PM »
I have also done it another way. I created a Control macro that you could type in the files names in order of run and IT would process each gcode file in order.
(;-) TP
Logged
TomR
Active Member
Offline
Posts: 17
Re: How can I have a G-Code program load and run another G-Code program
«
Reply #4 on:
April 26, 2012, 07:16:17 PM »
My wife had to run to the store so this gave me a chance to try your macro suggestion tonight. Sometimes she gets impatient when I work on my router in the evenings. Women just don't understand these things.
Anyhow, when I try to write the macro I get a VB Scipter compile error and highlighting the ":" Here is the text of the macro:
'M5001 Macro to run Push Stick.Tap
LoadRun(C:\Mach3\Gcode\push stick.tap)
Any ideas?
Regards, TomR
Logged
BR549
Active Member
Offline
Posts: 4,095
Re: How can I have a G-Code program load and run another G-Code program
«
Reply #5 on:
April 26, 2012, 08:39:08 PM »
YOu forgot teh " " same as I did in the example
'M5001 Macro to run Push Stick.Tap
LoadRun("C:\Mach3\Gcode\push stick.tap")
Also IS "push stick" all one word OR is there really a space in between?
OOPS, (;-) TP
Logged
TomR
Active Member
Offline
Posts: 17
Re: How can I have a G-Code program load and run another G-Code program
«
Reply #6 on:
April 27, 2012, 09:46:48 AM »
Thanks BR549.
Making the above format change has the M5001 macro working perfectly. I tested a 3-program sequence with complete success.
Thanks for all your help. Also "push stick" does include the space as typed, however a good heads-up on your part.
Regards, TomR
Logged
BR549
Active Member
Offline
Posts: 4,095
Re: How can I have a G-Code program load and run another G-Code program
«
Reply #7 on:
April 27, 2012, 02:50:50 PM »
Just a suggestion but that space has gotten me several times in the past(;-)
I started useing a filename format as ALL one worg but capitialize the first letter in each word.
PushStick.tap
Just a thought, (;-) TP
Logged
TomR
Active Member
Offline
Posts: 17
Re: How can I have a G-Code program load and run another G-Code program
«
Reply #8 on:
April 27, 2012, 05:18:32 PM »
Good thought, I see what you mean.
Thanks again.
Logged
TomR
Active Member
Offline
Posts: 17
Re: How can I have a G-Code program load and run another G-Code program
«
Reply #9 on:
May 01, 2012, 04:45:42 PM »
The mcode macro is working fine in running gcode programs sequentially. However, the tool path is not regenerating on the tool-path screen when the macro loads and runs the gcode. I tried using an OemButton(160) after the load/run command but without success. Mach3 shows a dialog box indicating the tool path is being regenerated but neither regenerates the tool path nor runs the gcode. Seems like its in some kind of loop.
'M5001 Macro to run PushStick.Tap
LoadRun("C:\Mach3\Gcode\PushStick.tap")
While IsLoading()
Wend
DoOEMButton(160)
Thanks, TomR
Logged
Pages:
1
2
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****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
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> CS-Lab
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Mach3 Wizards
=> Newfangled Mill Wizard
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...