automatic start a marco when the printer is on?
-
I'm trying to automate my priter for an automatic bed mesh when i turn it on i have made 3 macros for this task, the first for delploy probe the second for the z=0 and the third retract probe.
-
It is generally consider a bad idea to have any sort of movement occur when powering on the printer.
Frederick
-
@fcwilt ah
-
@Simone so when i send a print?
-
That is the way I do it.
I make use of the slicer feature which allows executing some "external" user code.
I have two files: print_begin.g and print_end.g
In the slicer, in the appropriate places, I have M98 P"print_begin.g" and M98 P"print_end.g"
Those two files do everything I wish to happen when the print begins and when the print ends.
Among other things at the start of a print I...
- set the Z=0 Datum using the Z probe
- load the heightmap for mesh compensation
Frederick
-
@fcwilt Wouldn't it be easier to just use
start.g
andstop.g
files that are called automatically on print start and stop instead of creating separe ones and putting a call in slicer generated g-code? -
@BoA said in automatic start a marco when the printer is on?:
@fcwilt Wouldn't it be easier to just use
start.g
andstop.g
files that are called automatically on print start and stop instead of creating separe ones and putting a call in slicer generated g-code?It has to do when they are called. The file "start.g" is called before any slicer code executes which can result in the slicer code changing settings that were set in the "start.g" file.
At least with the slicers I have used I can insure that my files are called and take precedence over anything the slicer may have already done.
Frederick
-
I have a macro that runs when I start the printer to do some startup tasks - heat the bed, home the printer, level the bed, generate the mesh. To deal with the issue of having the printer start moving on its own, I post a blocking M291 message to the user asking if they want to start the process. The need to give the OK.