JGMaker3dofficial / artistd

GNU General Public License v3.0
25 stars 15 forks source link

Present bed to printer front on stop print #18

Closed mikejr83 closed 3 years ago

mikejr83 commented 3 years ago

Description

Modify the g-code in EVENT_GCODE_SD_ABORT to add a G0 command. This presents the bed forward.

Benefits

Enables the user easy access to the print area.

Related Issues

Closes #17.

mikejr83 commented 3 years ago

Right now the g-code is modified to be:

#define EVENT_GCODE_SD_ABORT "G28XY\nG0 Y" STRINGIFY(Y_BED_SIZE)      // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")

I thought about adding g-code to disable steppers except for z.

We could go with it by modifying the commit to be:

#define EVENT_GCODE_SD_ABORT "G28XY\nG0 Y" STRINGIFY(Y_BED_SIZE) "\nM84 X Y E"      // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
mikejr83 commented 3 years ago

It looks like I need to add a feed rate parameter to the G0 command. Depending on when you stop the print the feed rate could be slow an the G0 takes a long time. Other than that in practice I like this functionality.

TwinkieXLII commented 3 years ago

Is this ready to go as is? or do you need to add the parameterized GCODE?

mikejr83 commented 3 years ago

I tested a few changes on my end and want to put them in. Give me a moment and I'll do that.

mikejr83 commented 3 years ago

@attacktwinkie I updated the commit. The gcode now breaks down to this:

G28X ; moves carriages to their parked location
G0 Y310 F1500 ; moves the bed "forward" at a decent speed
M84 X Y E ; disable the steppers except for z

I exploded that out from the actual code, but the gist is move buckets to the side, move the head to the back (bed moves forward), and then disable the steppers except for z (so it doesn't fall down). I had the feed rate 3000 and it was shooting forward. I cut it in half.