Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: davy182 on March 19, 2012, 11:39:22 AM
-
We do a lot of pen tracing, and we have found that when my cnc operator gets interrupted and doesn't remember to close the pen file and load the cut file we mess pieces up. SO is there a way I can have the gcode file automatically close after it is run ( I do realize the easy thing is to get in the habit of load programs correctly, but it is a mistake that can be easily done and cost money) . I was thinking this may entail putting a macro at the end of the program in the post processor. I don't have a clue how to do this yet so a copy/paste instruction and help would be great.
-
I guess you would make a new macro with the do oembutton 169 (close current file). Maybe this is incorrect, if I put in the close file in the code, when mach loads the gcode it goes through it first would't it close the file?
-
In General Config, there's an option to ignore M codes while loading.
-
Could I do something like this. But with the 169 button
From:http://www.henriksplace.se/cnc/cnc_mach3_vb.html
Here's a macro that closes down Mach3 and shuts down the PC. If saved as M300.m1s for example we can call that instead of M30 at the end of the G-code and it will shut down the PC for us.
Code "M30" 'Stop and rewind
If IsLoading = 0 Then 'Is the code loading or should we actually run it?
Message("Shuting down...") 'Tell operator we are shutting down.
DoOEMButton(705) 'OEMButton705 shuts down the PC
End If
-
I am not sure that would help you. AS IS when the first program ends it rewinds and MACH3 is sitting idle. HOW does that mess things up???
I take it after the first program runs the OP needs to load a different program to run ??
(;-) TP
-
Just add the following line to the M1030 macro
DoOemButton(169)
The M1030 macro is automatically called by the M30 mcode at program end.
(;-) TP
-
Worked out great