GCODE Tutorials Ep.2 : M420 - How to make your bed levelling work properly, and what M420 does.
In this episode the weird British guy is explaining something called M420 and where to put it in your start code, and why it always seems to have an S1 on it.
Also features some stuff about G29, G28, and maybe even some M500 for good measure.
Anyway, enjoy!
(you might hear some noise in the background of the video, does it bug you, can you hear it? Let me know. It's hard for me to never be printing during recording, so maybe sometimes I need to leave in the fan noise or whatever)
Bed levelling template used in video:
www.thingiverse.com/thing:487...
Join us on Discord! There are many of us now! Hundreds! (somehow we're up to about 270 members now!) / discord
* Please consider supporting the channel to allow me to do more, and better stuff! *
(also you get to see the odd bit of out takes, extra content, and sometimes, usually actually, a chance to see videos first):
/ lostintech
Pamgaea by Kevin MacLeod
Link: incompetech.filmmusic.io/song...
License: filmmusic.io/standard-license
Пікірлер: 152
As always with Lost in Tech videos, you shine a bright light on a topic not well understood by many. And the flow charts! I love the flow charts!
Great video as always man :) I never thought about the fact that z height moving during the first layer helps show the mesh working! Thanks for the tip 😎
Hey! I'm a machinist and i use Gcode when I have seen the title I asked myself "wtf is m420?! I have never used it before" and it didn't even crossed my mind that you were talking about 3dprinter Gcode 😂 it was a good surprise!
@LostInTech3D
Жыл бұрын
Oh, I should have included the keywords 3d printing in the title! Glad you enjoyed it anyway 🙂
Ahh the old 420 helping people to be happy
dude u have saved me!! i was so close to sending my cr touch back! i could not for the life of me i could not get UBL to work! turns out i was missing M420 on my gcode thingy...ur a legend! subbed!
The S argument for M420 can be understood if you understand what the manual says. As I recall the online manual says "S". That means the value for the S argument is a boolean value with 1=true or on, and 0=false or off. This (and a lot of the Marlin documentation) is what happens when programmers write documentation before remembering to code-switch from programming jargon to normal vocabulary.
@skyleite
Жыл бұрын
Booleans are commonplace even in the most basic programming circles. The documentation for GCode is documentation of a programming language, so they're going to use programming terms. An API reference is not supposed to be a tutorial.
Oh this is great information. Thank you for the clear explanation!
Definitely more videos on mesh bed leveling and Gcode
Awesome thank you so much for clarifying all this up for me! I've been pulling my hair out trying to figure out what was wrong with my printer. Come to find out I had no idea my mesh leveling wasn't being saved. Lol. Ya I'm new to all this but learning everyday. Thank you again! Going to go try it out now
ROM = Read Only Memory, comes preprogrammed on the chip die. PROM = Programmable ROM, can be programmed ONCE, then that's it. EPROM = Erasable PROM, can be erased with UV light and the package has a transparent window, usually covered with a metallized sticker. EEPROM = Electronically Erasable Programmable Read Only Memory, it's almost static RAM, but less volatile. Still waiting for the next letter to be tacked on the front.
@LostInTech3D
Жыл бұрын
Have we not had EEEPROM yet? I'm surprised.
@Guardian_Arias
Жыл бұрын
Quantum Electronically Erasable Programmable Read Only Memory = QEEPROM Now with AI learning
@ExtantFrodo2
Жыл бұрын
MERWDSUAMTYCCW (Manually Erasable Read Write Draw Sculpt User Access Memory that you can cook with) : a book made of aluminum foil.
@Sembazuru
Жыл бұрын
Just watch out for the counterfeit *PROMs as they tend to be WOM. (Write only memory). 🤣
@cekiert
9 ай бұрын
Is far a as the window to erase, I believe most modern eeprom chips removed this for size constraints. And id assume possibly removed the UV erase entirely if the chip was even decapped.
Great video! I had been trying to add more probing points on my ABL mesh for weeks LOL!
Great video. I setup my gcode using Jyers guide when I flashed that on my Ender 3 v2 so now I want to verify I have it right
M420 (blaze it) S1
Very Good and Clear Video! Thank YOu!
I would love more of these videos
Great video!
@6:55 The setting ENABLE_LEVELING_AFTER_G28 is what I use, and works perfectly: Every print use the mesh automatically. If you messed with the bed and you find you have to re-mesh, just do a G29 and a M500 to store the mesh and Bob' your uncle..
Please expand on this. I can't believe how little info exists about this. I have installed ABLs on my printers for the longest time not know what the hell is going on
I've had a CR Touch installed for close to a year. Somewhere along the way I got messed up with the commands. After your Twitter post last week, I looked into it more. Yep, been creating nice meshes for nearly a year but was not using them 🤣🤷♂️ My E3V2 is still a PITA at times, but it's printing better now.
Literally can't remember the name of it but, yeah.... I video on how to do a manual mesh would be interesting, I get on well with how you explain Gcode.
So it's like 42, but with 0! Probably not the 420 joke you've meant ;) Manual UBL looks interesting, it _seems_ possible but reading the Marlin doc about it becomes impossible quite fast. Also as for 00:05, yes.
Thank you!
I kept reading all the code notes hoping there's more jokes than just the first line XD
If you have UBL have it build a very fine mesh and on every G29 command add a J argument "G29 J" to do a 3 point probe but 10x each point. In firmware set it up so the outliers get automatically omitted and you will get insane accuracy of course this works best on the most rigid of bed substrates such as glass beds or extremely thick aluminum or steel bed bases.
@mirkowachter3323
Жыл бұрын
Which parameter lets outliers be omitted?
Thank you!!
Yeah, more of these.
great video, I have been struggling with the automatic bed leveling...
M420 ZXX sets your fade height. Hence, at 7:27, your Z will stop moving in between layer heights, after the fade height is surpassed.
@tvideo1189
Жыл бұрын
It also produces more accurate parts if you fade the mesh. He didn't bring that up either.
If I'm understanding this correctly, with ABL (BLT) all you really need is the G29 command AFTER the G28. Even if G28 disables bed leveling, G29 would enable bed leveling and do the bed level, creating a mesh. This mesh is then saved to RAM and used for the current print. Yes, if you turn off printer, this bed mesh is lost, but run the G28/G29, creating a new mesh in RAM and everything should be fine? Is this correct? Thanks! Great video.
@LostInTech3D
Жыл бұрын
yes - EITHER G29 to re level, OR M420 S1 to use the stored mesh. One or the other :)
@atlasrn
Жыл бұрын
@@LostInTech3D Amazing! You're the best. Subscribed :)
I just use klipper, it’s quite useful and does the bed leveling mesh thing
Need more Input! I may have to watch this again later at a reduced speed. Haha
Is there a G69 to go with my M420?
@LostInTech3D
Жыл бұрын
G69 is "cancel rotation" 🤔
@Dystrackshun
Жыл бұрын
@@LostInTech3D kinda fits
Thanks for the info! So something like below would be redundant, or basically make its own mesh, then load one that you stored from earlier, correct? G28G29 ; Home all axes M420 S1 ; Enable mesh
@AlAmantea
Жыл бұрын
No In your example given, the G29 would never run. The printer home itself, and the currently stored mesh would be loaded from memory or if already loaded, would be enabled (M420 S1). The G29 would be ignored as it needs to be on it's own line.
yeah the s in m420 is boolean operator for g29 is slot operator so its self explanatory after some googlin
Nice
Flying Bear Ghost 6 has manual mesh enabled from factory in Marlin 2.x (no ABL in stock configuration)
a little help please.can you tell me if this is correct? I have a ender 3v2 with cr-touch,these are my g codes.G28 ; Home all axes G29 P1 ; Home automatically and run mesh leveling on every print
I want to plot the bed leveling (x,y,z) data in a 3d mesh using javascript. How do I export the ABLdata once the machine has collected it? After ABL is done I would connect to the printer with Pronterface and get the 49 ABL data points, to copy them, Is this right? M420 V1 T1 ; export abl data in csv format
You mentioned it briefly - I have an E3 v2 with the crtouch. is that ABL or UBL?
@LostInTech3D
Жыл бұрын
It depends on the firmware, I know jyers has an UBL version, but generally it would be plain old bilinear.
I use this to load the mesh and do a 3 point level in case my gantry is off a little. With dual Z screws that happens a lot with mine. G29 L0 ; Load UBL mesh values from slot 0. G29 J ; Probe 3 points and tilt the mesh to the plane.
Hi very thorough video, I have what maybe a dumb question, Will a code without the letter work or be ignored? Example M420, will 420 produce same result? Thanks
@LostInTech3D
Жыл бұрын
I'm fairly sure it would throw an error (which means ignore unless you have a serial console hooked up)
The ender 3 factory firmware seems to have the RESTORE_LEVELLING_AFTER_G28 option set - but with G29 disabled as I get the message below. They have a different binary for use with a BL Touch, which presumably re-enables the G29 / M420 commands. This seems like a fairly logical way of doing things. >>> G28 SENDING:G28 echo:Unknown command: "M420 S1" >>> G29 SENDING:G29 echo:Unknown command: "G29"
It’s interesting that there are scores of ABL videos but almost zero mention M420 and I’ve found only one that is any good- yours.
It'd be awesome if you did do a separate video on the unified bed leveling and show us your start g code! Pleaseeee
@LostInTech3D
Жыл бұрын
Will do! I was thinking about doing this already 👍 Will need to actually sit down and work it out first though
@TT_R89
Жыл бұрын
@@LostInTech3D nice! I'll be looking forward to it.
@ruudsmits907
10 ай бұрын
@@LostInTech3DDid you come around to making this UBL? I would be very interested. Especially if you could get into using G29 J2 (tilting the mesh every time you start a print instead of doing a complete mesh) along with that! I have been running this on the mriscoc preconfigured marlin firmaware on my ender 3 V2, but it looks like it disables the mesh (as I do not see any movement on the Z-axis motor during 1st layer).
Ender 3 V2 with professional firmware here and no probe (only manual mesh bed leveling)...so I should use M500 after the M420 S1 command?
I think it’s important to mention the fade height as if the bed is poorly trained and no height is set, the printer will recreate the mesh for the entire height of the print, leaving you with apparent z-banding.
@LostInTech3D
Жыл бұрын
How does the mesh cause z banding? It's just non planar printing effectively?
@dondo8661
Жыл бұрын
@@LostInTech3D just a theory but what if the deviations in the z level are smaller in size than the resolution of the z-axis?
@LostInTech3D
Жыл бұрын
Very unlikely, you have 200 steps per revolution and there's 64 microstepping, plus the full turn of the screw, so each individual step is going to be 1/200*64*screw pitch
@dondo8661
Жыл бұрын
@@LostInTech3D It is unlikely, maybe my theory isn’t right but it did happen on an Ender 5 plus where adding the fade height reduced a ribbing that went up the height of a part. If I can find the part, I’d love to share it with you
@LostInTech3D
Жыл бұрын
interesting. No idea, but yeah please do!
I have a cr touch I do the paper test then I print. Once it’s starts printing my nozzle is not where I set it do you think this code will help?
Sorry, kinda phased out on the explanation (more likely due to me being noob in 3D printing), but all this fancy stuff doesn't apply if I have no auto bed leveling or some sort of electronic bed probe, right? I use paper to do that...
@LostInTech3D
Жыл бұрын
Yeah, there's a different video for that, none of this will make much sense on a printer with no leveling functions 😁
So if I wanna Auto Home -> Create Mesh -> Use Created Mesh I just put G28 -> G29 -> M420 S1 in the gcode right?
please do a UBL G29 version.
so if i click bed leveling on the printer, and have m420 in the Gcode. it will load the firmware that the printer just mapped out? is this correct?
Awesome. I just realized how much time I've wasted doing bed leveling since the startup gcode in Cura has always had G28 at the beginning; I opened the Marlin configuration file on VSCode just to check, and sure enough, both lines that reload the bed mesh were commented. Luckily, my heated bed is pretty flat so bed leveling has never been crucial, but now I wonder how many defects have been just because of those tiny variations. 🤡
The M420 S0 confused me for some time. Marlin using S to enable/disable the mesh really seems like a poor decision. So...how do you load a mesh from a specific slot??
@grim6980
9 ай бұрын
G29 L0 ; Load UBL mesh values from slot 0. Also G29 J ; Probe 3 points and tilt the mesh to the plane.
@andyspoo2
9 ай бұрын
@@grim6980 Thanks. I do that already now and it works VERY WELL on my ender 5+, but has issue on my 2 other smaller printers where somehow the created mesh seems to be inverted as in high where it should be low and low where it should be high.
So I have been stuggling to find a solution to my auto bed leveling problem and I can't find a solution to it. My problem is I have the CR Touch on m Ender 3 V2 and when it levels, the back left corner and the front right corner are not level even after manually leveling it. The points of measuring are not really that good and far over to 1 side and dont know how to change that but shouldn't give me false measurements. but the problem is the back left corner keeps adjusting upwards thinking its too close and the front right keeps adjusting down almost scraping the bed thinkig its too low. I dont know if the sensor is faulty or of the printer thinks its measuring somewhere else or if its measurements are inverted. I tried updating the software and it doesn't work so currently I disabled the loading mesh and auto leveling in the start code so I have to manually level like before I had it. If you have any way of editing points or measurement or rotate a mesh I would gladly like some help with it.
I am having a very strange issue with my modded ender 3 with idex and octopus board. It recently started happening. Is there a way we could chat and I can pick your brain? It's something I think with e steps changing in mid print. But that's just a thought. I like to get into pretty detail
@LostInTech3D
Жыл бұрын
Hop onto discord for some help with it 🙂
@toddcoello6461
Жыл бұрын
I will go there now. I'll posy the question later. I'm about to go to sleep. I work nights
Hi! Working with a CR10 Smart. So I added the M420 S1 and checked that Z axis is compensating while printing. Checked X grantry, bed bolds and updated firmware. Any suggstions?
@LostInTech3D
Жыл бұрын
err suggestions for what? :D
@joaquinsmucler8311
Жыл бұрын
@@LostInTech3D he sorry, suggestions to keep on trying leveling troubleshooting and not to throw the printer away
it's like the M211 command to turn on and off soft endstops "S" stands for "Switch" as in "switch on" or "switch off" just like in binary 0=off 1=on so M420 S1 = bed mesh on.
For Bltouch the gcode then is G28 ;home all axes G29 ;ABL M500 M420 S1 ?
so if you use g29. it will map the bed, and then save and use that mesh right away for the print it is working on?
@LostInTech3D
Жыл бұрын
yes - if you g29 it will store it in memory and use it until powered off
@eross21
Жыл бұрын
@@LostInTech3D cool. so if I hit the auto bed level button right after turning the machine on at the beginning of the day. As long as I use the 420 g code it will load that mesh that I mapped at the beginning of the day. ?
This video kind of confused me further. So, what do I use if I just want it to level before every print, G29 then M420? I've been using g29 as I thought it would auto level before every print but the first layer is not coming out good. I have set the z offset according to another video but I am still getting really crummy first layer with a 16 point mesh.
@LostInTech3D
8 ай бұрын
G29 would do it. If that isn't working then...you might have a hardware issue or something loose
@Fly_Production
6 ай бұрын
Same
1:40 artillery hornet does it this way and i love it ….. that printer is stupid fast for an ender like machine and i didn’t want to add any weight on the printhead with a BL touch
@LostInTech3D
Жыл бұрын
artillery printers are underrated, I did a respectable benchy in 14 mins on the X2 and it didnt even look bad.
@martinskamla6789
Жыл бұрын
@@LostInTech3D the only issue I had with the hornet was that the glass bed was glued down to the ALU plate and the blue was extremely uneven and wasn’t applied at All in some spots making some parts of the glass upto 10C cooler than others…… basically unusable for PETG and other warping fillaments out of the box…. Slapped PEI and magnetic sheet on it and now it’s awesome
Can this be applied to a cnc machine for warped wood?
@LostInTech3D
Жыл бұрын
I'm really not sure!
Can you make video guides for Klipper please.
Should I put M420 before or after G92 because unlike other profiles I’ve seen, my G28 comes first then G92 and I’ve then put in M420 S1 and I’m still having mesh issues
@royflora2338
3 ай бұрын
unless I'm mistaken G92 is to set positioning. That should not be in your start code. Your g-code should start with your machine bed warming up then nozzle then as a personal preference i set G90 just in case it isn't due to me adjusting it and forgetting lol. Then your G28 home command, then M420 S1 to load the saved mesh. If you want to level every print anyway then instead go with G29. Whatever you do Never put G91 in your g-code.
@royflora2338
3 ай бұрын
okay so you're talking about the G92 E0 all that is doing is resetting the extruders position to 0 none of those should mess with your mesh, if you have saved your mesh to eeprom then M420 will load that mesh, if you have not saved it or are unable to, then just use G29 after G28. That will create a new bed mesh before every print but it should do the trick
I cant for the love of god get my ender 3 v2 neo use the mesh. It just wont move the z axis at all in any layer. I use the G29 after the G28, it does the probing but never uses it. How can I solve this please?
It's specifically listed as a command that takes a boolean argument. either 0 or 1 (on/off). has nothing to do with slots.
why doesnt it work for creality? whatever I list in the gcode sequence it will always repeat G29 instead of reading from the saved mesh? It just ignores M420, or it re-levels even if there is no g29 in the gcode. Is there a way to change it?
@LostInTech3D
Жыл бұрын
I'm not a huge creality user these days but if it really does G29 instead of M420 then the only way to fix that will be to rebuild the firmware or get a community build. It's not as bad as it sounds, I do it quite a lot, as long as creality share the source like they are supposed to.
@pawelw.9172
Жыл бұрын
@@LostInTech3D I do have a source code from creality though... dont know where to look for "the facts" anyway ;)
SOOOOOO ,you maybe able to help me out then , with the Neptune 3 I'm having issues with it saving the Z offset and it may be because of my starting Gcode What would be a good starting gcode for the Neptune 3 since it's not a actual probe but the sensor nozzle thing probing the bed ??
@LostInTech3D
Жыл бұрын
I just use the ender 3 cura defaults for mine. What do you mean issues saving the z offset?
@enrilopez
Жыл бұрын
@@LostInTech3D it will erase my z offset back to 0 and I'll have to re calibrate while printing , elegoo sent me a new firmware Which is just slower while probing and told me that the way to save the offset to the Eeprom was that on the temp tab to set values there's the option for bed and hotend for leveling once the mesh is done to go there and click save
@LostInTech3D
Жыл бұрын
Wow, I never had that problem on my unit. You can include it in the start gcode for sure...I think there's a few ways to do it but g92 would be one of them. So, I made a video about that 👍
@enrilopez
Жыл бұрын
@@LostInTech3D how would you do the starting gcode for recovering the mesh with the Neptune?? G29 something something or m420 s1 something something?? Mine when I downloaded cura is G29 E0 reset extruder G28 home M420 S1 restore manual mesh G1 Z4 G92 E0 reset extruder ( again) Should I change anything??
@LostInTech3D
Жыл бұрын
That should work? Except it's g92, not g29 ;)
should we do an auto level for every single print we print out ?
@LostInTech3D
11 ай бұрын
No...but new printers like the bambu and k1 do......
Thank You! Subscribed.... Why is this info so hard to find???
I use G29 or M420 S1 but the compensation don't work, please help me :(
Why dont they use a method that purges more on lower areas only on the first layer instead of moving the z axis for the complete print
@LostInTech3D
Жыл бұрын
Interesting idea. I don't know! I guess it would work!
@KevinDC5
Жыл бұрын
Because having elephants foot on only half of a print would still be trash. IMO. 😅
@hommerdalor6301
11 ай бұрын
Hello. Did you find a way to do it? Cheers.
Wait, auto bed levelling doesn't do anything unless you have m420 in the start gcode? A'd the mesh gets removed every time I turn off the printer? This is a confusing video.
@LostInTech3D
Жыл бұрын
I'm not sure if it's that confusing since you seem to have the correct answers 👍
@TijgerPapa
Жыл бұрын
@@LostInTech3DYou're right, it's not the video that's confusing, it's the topic 🙄. Also, I'm feeling duped by creality. Bought an ender s1 pro with auto bed levelling, only to find out it doesn't work as I thought it would. Now I understand (sort of) why my first layer never ever sticks after auto bed levelling. I always end up doing it manually (still a noob at it all). No criticism on the video though, I love them. I learned a lot of them already.
@LostInTech3D
Жыл бұрын
Haha yes I'm sure about half of printer owners don't realize they aren't using the mesh. Self included, which is why I made the video
i do have one question.. why do have 100 probe points but it only ever gets to 57??
@LostInTech3D
Жыл бұрын
Huh?? Does it just stop?
@Somedaystreams
Жыл бұрын
@@LostInTech3D sorry for late reply yes it just stops :/
Does anyone know m915 or the stall detection
great video bro, but please there is absolutely no need of annoying background music. We are here to listen to what you have to say.
@LostInTech3D
Жыл бұрын
Haha, good job I never use annoying background music, only the finest stuff here 😉
Can a printer print without a nozzle? Could you test that?
@LostInTech3D
Жыл бұрын
The answer is no, I don't need to test that 😂
@alexdashwood4976
Жыл бұрын
@@LostInTech3D Are you sure? 🤣You never know until you try 😆
Please sir teach me what UBL/ABL mean
P = programmable
G28 clears the mesh 0_0?!?!!
420 haha
@LostInTech3D
Жыл бұрын
I expected this.
@welshdave5263
Жыл бұрын
@@LostInTech3D I was about to say something similar, then I saw the "TIP" box
Stay in Cura 5 (has Z-offset... !!!) Good for 90% of 3DP Users ! Marlin is machine code intensive, If your an engineer, Rock Out, otherwise dont kill yourself with needless overcomplication ! Great video ! ~liked ~subD
@kingleodiamond
Жыл бұрын
So if I’m using cura 5 I shouldn’t have to worry about trying to learn and do these steps?
@LostInTech3D
Жыл бұрын
Errr no, you still need the correct bed mesh commands in any slicer
@kingleodiamond
Жыл бұрын
@@LostInTech3D yea I figured it out after I asked this thank you!!
@kingleodiamond
Жыл бұрын
@@LostInTech3D by the way chep has a great video to help explain this
0:48: NOT AN ACRONYM ... Acronyms are a subclass of initialisms that are pronounceable as their own word. ABL is not normally referred to as "able" nor is UBL normally referred to as "ooble", and MBL is possibly only pronounceable as a word in languages like Welsh. Therefore, these terms are spelled out when spoken and each letter refers to the first letter of an actual word, so it's A, B, L, for example, and therefore they are initialisms. Now, let's talk about the signs at the market checkout station that says "15 or less" ... So many English ignorant people (sadly, usually a result of American public education). SMH.
@LostInTech3D
Жыл бұрын
An admirable soliloquy 😉
I think you dont teach good because you just talking please put much more picture and tell me what should we do you other channels doing like this and they are hekp to solve our problems
@LostInTech3D
Жыл бұрын
Sure, what would you like pictures of, squirrels?