I need to write a G-code program that calls certain other g-code programs in a specific order.
Say I have;
1.tap
2.tap
3.tap
If opened individually these files make a single part.
Then I want a "job" file that calls these like so;
Load 1.tap and run
Load 3.tap and run
Load 1.tap and run
Load 1.tap and run
Load 2.tap and run
Each tap file cannot know of the existence of each other, only the "job" file knows who to run next.
Is this possible?
Best guess so far is to create a macro, call it m999
Function Param1 () as String ' gets P word
StrutFile = "C:\" + Param1 + ".tap"
LoadRun (StrutFile)
The job file;
M999 P1
M999 P3
M999 P1
M999 P1
M999 P2
What am I missing? How does the macro return to original code running? Or once a new file is loaded is that it?