smartin015 / continuousprint

Octoprint plugin to allow the creation of a print queue that prints, clears the bed and then prints again
40 stars 38 forks source link

Success is imminent...MK3S+ / CPQ / VAAPR #211

Closed rogiepoo closed 1 year ago

rogiepoo commented 1 year ago

Discussed in https://github.com/smartin015/continuousprint/discussions/210

Originally posted by **rogiepoo** February 26, 2023 Hi! I am on the verge of total success in setting up my MK3S+ with Octo's Continuous Print. Also I have the 3DQue VAAPR bed overlay which I have several months' experience with. My start code seems to work great, and I am able to write my own bed clearing code (uses the nozzle to knock of a part). However, what is happening is that after the first print finishes, after going home (correctly) it immediately goes into mesh bed leveling, skipping the cooling cycle. At this point, the print is still on the bed, yikes! Since my test print is very small, it is not crashed into by mesh bed leveling, and so it completes it and goes home. THEN the cooling cycle begins. [I have it set up so that when Y =0, a momentary toggle switch mounted at the back of the printer is bumped into. When depressed, this relay switch activates a low-level current which in a relay circuit, which in turn activates 115V current from a wall outlet to activate a powerful cooling fan. This works great; the bed & prints are cooled in five minutes. I can and will share setup info] Then it does mesh bed leveling again TWICE more, before moving onto the bed clearing script. It runs the clearing script, and then....drum roll please...it's time for mesh bed leveling! With an ice cold nozzle and bed, of course. When done, it homes with a Y=0 and engages the fan switch, while simultaneously attempting to heat the bed & nozzle. I have modified the start gcode (kept in Prusaslicer) to run the nozzle and heating sequence twice: once with the noz to 170C and bed to 60C, followed by a mesh bed leveling sequence, and then another heating cycle with noz to 240 and bed 60 (so no change to bed temp, just stays 60). 240 kind of high but works great for PLA I am using (PolyTerra Matte) and a VAAPR bed. This two step approach help prevents unwanted PLA buildup on the nozzle before entering the purge sequence followed by the actual printing of the part. So in summary, the start code works good, the clearing script is good, but I have a surplus of mesh bed levelings taking place, and I need to delete those and just get on with bed cooling followed by the clearing routine, then just go to the next print (which has the heating1, leveling, heating2 as start code). Where is all this mesh leveling coming from? Is this in the firmware for the printer? How do I get rid of it? Thanks for any and all suggestions. I am including my scripts and where I have them, as follows: **Start code, kept in Prusaslicer and added to the Gcode of each part that I slice:** M862.3 P "[printer_model]" ; printer model check M862.1 P[nozzle_diameter] ; nozzle diameter check M115 U3.11.0 ; tell printer latest fw version G90 ; use absolute coordinates M83 ; extruder relative mode M104 S170 ; set extruder temp M140 S[first_layer_bed_temperature] ; set bed temp M190 S[first_layer_bed_temperature] ; wait for bed temp M109 S170 ; wait for extruder temp G0 X0 Y1 Z1.5 F3000 ; home all without mesh bed level G80 ; mesh bed leveling G0 X0 Y1 Z1.5 F3000 ; home all without mesh bed level G1 Z0.2 F720 ; I DON'T KNOW WHAT THIS IS FOR BUT IT WAS IN THE PRUSASLICER STARTGCODE G90 ; Use absolute coordinates M83 ; Extruder relative mode G92 E0 M104 S[first_layer_temperature] ; Set extruder temp M140 S[first_layer_bed_temperature] ; Set bed temp M190 S[first_layer_bed_temperature] ; Wait for bed temp M109 S[first_layer_temperature] ; Wait for extruder temp G92 E0 G1 X200 Y10 Z1.5 F3000; Go to RIGHT of bed to begin purge line G1 X225 E20 F400; Draw purge line G1 E-0.8; Retract G0 X225 Y50 F4000; Move quickly away G92 E0 M221 S{if layer_height<0.075}100{else}95{endif} ; Don't change E value below. Excessive value can damage the printer. {if print_settings_id=~/.*@0.25 nozzle MK3.*/}M907 E430 ; set extruder motor current{endif} **End code. kept in Prusaslicer and added to the Gcode of each part that I slice:** {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif} G1 X0 Y200 F3600 ; park {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif} G1 X0 Y0 Z1.5 F3600 ; park at origin M221 S100 ; reset flow M900 K0 ; reset LA {if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif} M104 S0 ; turn off temperature M140 S0 ; turn off heatbed **Clear Bed, Fires on Print Success and Que Finished:** M104 T0 S0 ; extruder heater off M140 S0 ; heated bed heater off G28 ; home all axes G90 ; absolute positioning G0 X25 Y0 Z20 F3000 ; raise the extruder 2cm go to COOLING location at 3000% normal speed M190 R27 ; wait for bed to cool to 27C G28 ; home all axes G90 ; absolute positioning G0 X25 Y5 Z20 F3000 ; raise the extruder 2cm go to starting point at 3000% normal speed G0 X245 Y5 Z20 F3000 ; go to lower right corner of bed, hold Z at 20 G0 X245 Y275 Z20 F3000 ; go to upper right of bed, holding Z at 20 G0 X215 Y275 Z20 F3000 ; go over to the left by 3 cm G0 X215 Y275 Z1 F3000 ; drop down the nozzle to 1mm over the bed G0 X215 Y5 Z1 F1000 ; slowly complete first wipe vector G0 X215 Y5 Z20 F3000: lift Z 20mm up @ 3000%speed G0 X215 Y275 Z20 F3000 ; go to top of bed, holding Z at 20 G0 X185 Y275 Z20 F3000 ; go over to the left by 3 cm G0 X185 Y275 Z1 F3000 ; drop down the nozzle to 1mm over the bed G0 X185 Y5 Z1 F1000 ; slowly complete 2nd wipe vector G0 X185 Y5 Z20 F3000: lift Z 20mm up @ 3000%speed G0 X185 Y275 Z20 F3000 ; go to top of bed, holding Z at 20 G0 X155 Y275 Z20 F3000 ; go over to the left by 3 cm G0 X155 Y275 Z1 F3000 ; drop down the nozzle to 1mm over the bed G0 X155 Y5 Z1 F1000 ; slowly complete 3rd wipe vector G0 X155 Y5 Z20 F3000: lift Z 20mm up @ 3000%speed G0 X155 Y275 Z20 F3000 ; go to top of bed, holding Z at 20 G0 X125 Y275 Z20 F3000 ; go over to the left by 3 cm G0 X125 Y275 Z1 F3000 ; drop down the nozzle to 1mm over the bed G0 X125 Y5 Z1 F1000 ; slowly complete 4th wipe vector G0 X125 Y5 Z20 F3000: lift Z 20mm up @ 3000%speed G0 X125 Y275 Z20 F3000 ; go to top of bed, holding Z at 20 G0 X95 Y275 Z20 F3000 ; go over to the left by 3 cm G0 X95 Y275 Z1 F3000 ; drop down the nozzle to 1mm over the bed G0 X95 Y5 Z1 F1000 ; slowly complete 5th wipe vector G0 X95 Y5 Z20 F3000: lift Z 20mm up @ 3000%speed G0 X95 Y275 Z20 F3000 ; go to top of bed, holding Z at 20 G0 X65 Y275 Z20 F3000 ; go over to the left by 3 cm G0 X65 Y275 Z1 F3000 ; drop down the nozzle to 1mm over the bed G0 X65 Y5 Z1 F1000 ; slowly complete 6th wipe vector G0 X65 Y5 Z20 F3000: lift Z 20mm up @ 3000%speed G0 X65 Y275 Z20 F3000 ; go to top of bed, holding Z at 20 G0 X35 Y275 Z20 F3000 ; go over to the left by 3 cm G0 X35 Y275 Z1 F3000 ; drop down the nozzle to 1mm over the bed G0 X35 Y5 Z1 F1000 ; slowly complete 6th wipe vector G0 X35 Y5 Z20 F3000: lift Z 20mm up @ 3000%speed G0 X35 Y275 Z20 F3000 ; go to top of bed, holding Z at 20 G0 X5 Y275 Z20 F3000 ; go over to the left by 3 cm G0 X5 Y275 Z1 F3000 ; drop down the nozzle to 1mm over the bed G0 X5 Y5 Z1 F1000 ; slowly complete 6th wipe vector G28 ; home all axes **Bed Cooldown** Fires on Queue Finished, Print Success, Bed Cooldown: G28 ; home M17 ; enable steppers M190 R27 ; bed cooldown to 27C My Events, in the order presented on-screen: Queue Finished (Fires when there is no work left to do and the plugin goes idle.) Script: Bed Cooldown: _G28 ; home M17 ; enable stepp..._ Script: Clear Bed _(Prusa i3 MK3S+)_M104 T0 S0 ; extruder heater ... Script: Finished _M104 T0 S0 ; extruder heater ..._ Queue Deactivated (no script entered) Queue Activated (no script entered) Print Success Script: Bed Cooldown Script: Clear Bed (Prusa i3 MK3S+) Print Start (no script entered) Print Cancel (no script entered) Bed Cooldown (no script entered) Script: Bed Cooldown: _G28 ; home M17 ; enable stepp..._ Awaiting Material (no script entered) I suspect I may have some events out of order. I do not have the Bed Cooldown selected in the Behavior settings. Even if I had that though, I don't know why I am having so many mesh bed leveling events. I hope I typed this up appropriately. This is my first post and I don't often post (on any discords very often!) and so I hope I am following protocol. If not, please advise. Thank you for any and all suggestions / comments / direction. Best regards, Rog [octoprint-systeminfo-20230226103653.zip](https://github.com/smartin015/continuousprint/files/10836356/octoprint-systeminfo-20230226103653.zip)
rogiepoo commented 1 year ago

So, I'm responding to my own post here. Upon further diagnostics, I have narrowed down the matter of excessive mesh bed leveling to originating from the slicer which I am using, namely Prusaslicer. I did this by uninstalling CPQ, logging off Octoprint, unplugging the RPi. Placing the test print on an SD card without making changes, I attempted one print. I encountered mesh bed leveling before the print (desirable), immediately after the print (not good; ignored my endcode cooling and clearing scripts), and as I recall at least two more mesh bed leveling events (new acronym; MBL) prior to finalizing everything. Will try removing MBL from all start & end codes altogether. Perhaps more to come. Thanks for any inputs!

rogiepoo commented 1 year ago

And again, I am responding to my own post, because with more research, something valuable to others has surface. Let it be known, that G28 in Prusaville is not the same as G28 on the Marlin site. G28 in Prusaslicer INCLUDES MESH BED LEVELING. To not include the mesh bed leveling, type G28 W. I am testing this right now. I did not figure this out; my wife did. She first notice that G80 on the Marlin page did not correspond with G80 on the Prusa Gcode page and that's when the sleuth kicked in and she figured this out for me. Thanks Hon!!! -R

rogiepoo commented 1 year ago

Thanks to Pierro55 for getting me going on better diagnostics! :) All the best to you!