G-Code Tips - Prusa Slicer - RepRap - Marlin - Chris's Basement

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today we're going to take some time and look at some g-code commands and how they affect how your 3d printer operates as well as how they're used inside your slicer hello everyone chris here back again and i do get a lot of questions about g-code and most of the time it's not about certain features that you enable through the g-code it's mainly about how did this command get into my g-code stream and where did it come from and what is it doing to my 3d printer and most of the time when you see something like that it comes from your slicer the most common ways to get g-code in there is from your start and in g-code so that's what we're going to do today we're going to go over a couple of different printer scenarios how i use start and in g code to make my printing experience more consistent and just all around what it does and how you can set it up on your printer today we're going to be using prusa slicer but it's going to be really similar to a lot of other slicers so let's get into it and take a look at what g-code i use on my 3d prints and the first thing that we need to discuss before we get into any g-code is how the firmware actually utilizes them i would say 80 of the time most of the commands you're going to run into with g-code are going to be the same no matter what firmware you run whether it be marlin reprap repeteer or clipper but if you need to know something about a g-code command this is the best site on the internet in my opinion to do so this is the reprap.org wiki g-code page this is an index of pretty much every g-code that you're going to see and it gets updated frequently no matter what firmware you're looking for it's going to give you a box here to try to decode it and figure out if that command works on your firmware set so that's always where i start so in prusa slicer we're set to expert mode so we can see all of the settings you can adjust those right here but we're going to kind of work backwards going off of that firmware notion so let's head to printer settings and in firmware settings you can select which flavor of firmware your printer is using and then save it in your printer settings profile this one's using marlin the main two we're going to be touching on today are marlin and reprap sprinter that's the one you want to set if you're using reprap firmware this handles all the nuances of different codes and how they're used by a printer just by changing this setting and most slicers are going to have this option so make sure this is set correctly first so let's start here this is an inter 3v2 it's about as simple a configuration as you're going to see inside a slicer for your start and end g code it runs marlin it doesn't really have all that many advanced features enabled and there's no auto bed leveling or anything you need to set up prior to starting your print everything is done pretty much manually here so a pretty simple setup and for this discussion we're going to create a default prusa slicer profile because i want to show you all the nuts and bolts of what you would get if you didn't have a profile already so we're going to go to configuration and we'll just go to configuration wizard we'll hit next you can select all your prusa profiles if that's what you want to do you don't have to have a proof of printer to use prusa slicer of course we don't need any sla you can select other vendors if you wish and then we're going to do a custom profile and let's just call this profile gcode video we'll hit next this will let you select certain parameters we're going to start with marlin you can always adjust these later like i showed you before we'll get a rough bed size i'm going to show you this as well inside the slicer so you know where to go to we'll call it 220 220 set your nozzle size your filament diameter these are good for this printer and then your temperatures by default it always leaves your bed temperature zero so you don't have a heated bed let's go with 210 for pla and 60 on the bed hit next we'll go ahead and let it put all the custom filaments in but we're going to create a custom one as well so we'll hit next update settings i'm just going to leave that there we don't need to export or pull in anything and we're going to go default expert mode so we can see all the settings and we'll hit finish and now that we went through that wizard we have our print settings our filament settings and our printer settings this video we're mostly going to be focused on printer settings and how start and end g-code affect your printer and i'm also just going to pull in a very simple print i want to right click out here and process slicer you can add generic shapes we'll add a box and i just want to have two layers so that you can see how the part fan works because it's usually off for the first layer we'll look at that as well but i'm going to unlock the factors i'm going to set the x 22 is fine y is fine but i'm going to lower z to 0.4 that will give us two layers at a point two layer height so this is our test shape now on to printer settings now there's a lot of things you can change in here i did go ahead and update my z but the main thing we're concerned about here is what firmware flavor we have so we're set to marlin because this printer does run it and it's important to note in prusa slicer if you're running marlin there's going to be a machines limit tab over here on the left that is going to impose all of these machine limits in your g-code so it's going to try to reset them every time you print this is mainly a feature that prusa has introduced so it's easier for them to calculate certain stats like print time now you might want to run reprap and sprinter as an option even if you're running a marlin machine just to get around this but this is kind of a side conversation we're not even really concerned with extruder settings here this is mainly a dialing in your print quality i just want to be able to set my start and end g code so my workflow is more efficient so then we go to custom gcode but just to show you what you get out of the box with prusa slicer and how important the start and ng codes are i'm going to delete everything in here we're going to put it back in a second but i'm going to remove it so we'll cut the start g-code lines save those for later and the same for ng-code now i'm just going to slice this as is this two layer print and send it to the printer so let's just go ahead and start our test print and watch what the printer does a lot of these are going to be much easier to see from prusa slicer but you can see here that it started preheating the bed we're now at 47 degrees on our way up to 60 but it hasn't done anything with the hot end yet the heater's not on as soon as the bed is up to temp you can see it turned the heater for the hot end on to 210 our default temperature this is pretty common to see in some of the slicers if you don't have it set up in the start and ng code correctly it's going to allow the bed to get up to temperature then start on the hot end just to save some load on the psu most psus nowadays you don't need to do this especially at 24 volt but again it's important to understand what your slicer actually does and after the hot end is up to temp the printer just takes off and starts doing the moves that are listed in the g1 commands in the g-code it doesn't even have a homing sequence by default so it didn't go x y and z so it's just printing in midair by default when you turn the printer on it always thinks that it's at 0 0 0. so this is why things like start and end g code are really important and when the print completes the printer does nothing it just stays exactly where it was it would actually be sitting on top of the print if this print would have actually been successful even the motors are still engaged on top of that if we take a look and crucial slicer one more time it didn't spin down the hot end or the bed heaters either they're both still up to temp and they will remain that way so now let's go back to printer settings and put the default g-codes back in the start and in g-code again this is the default custom profile that prusa slicer allows you to use with their wizard so at least this one is going to let you home all the axes before you start with a g28 and it's going to lift the nozzle five millimeters so you don't collide when you're on your way to your start point and then at the end of the print it's going to turn off the temperature right here and then home x only so we'll return the x carriage away from the print and turn the motors off now keep in mind this is only an m104 command we'll talk more about that in a moment and before we test the defaults here i want to go into filament settings because there are default settings in here as well you have your own set of custom gcode you can use in the filament specific settings this is particularly useful if you want to use a different pid setting for a filament or something like linear advance where from pla to petg tpu all those linear advanced settings are going to be different as well as cooling settings your park fan is going to be controlled with g-code but you need to tell it when you want it to be controlled for pla like we're doing in this video i like to keep fan always on and then enable auto cooling auto cooling allows the printer to slow down if the print time is on a certain layer isn't long enough so if there isn't enough print time on a single layer for that part fan to cool it completely before it lays the next one down autocool will slow the print so it has enough time to do that cooling properly before it starts the next layer and i like to only keep my fan disabled down here on the first layer so let's call it one layers that way it knows what g-code to insert into your g-code file to turn that fan on in the right spot these thresholds down here can be tuned i usually don't leave these on the default but for this video this should be enough information just know there are multiple places where you can see g code being inserted via the slicer so with those two modifications we'll go ahead and save and let's run that test again so with the defaults back in we are still heating the bed and the hot end separately the bed first hot in second and after the bed is up to temp it actually runs the g28 right there then you can see it actually start to heat the hot end so the default sequence is bed g28 then hot end and this is unique to every slicer and it's important to note that depending on your printer manufacturer or the firmware you're using there might be default routines built into that firmware that do certain things before the print starts and when the print ends like this machine here it has a confirmation when the print stops when you're printing from the sd card that will actually send the print head home in x and y just keep that in mind it might not be coming from the g code sometimes when the hot ends up to temp it went down to the zero position and it started the print i also did confirm on the second layer the part fan did kick on automatically so we fixed that and now the print is almost complete the print's done you can see it did home x it didn't move why the motors are disengaged back to prodder face you can see that it stopped the hot end heater it set it to zero but the bed is still active so the profile needs some work also you might notice that our test print is a little bit to the left of the print bed it's not exactly in the center it's about 10 millimeters off they should really correct that inside the firmware before they release a printer but they don't always but you can correct that in slicer and we'll talk about it so there's just a baseline and you can kind of see where i'm going here it differs from slicer to slicer but you really need a set of proper start and end g codes for your printer to make it easier to use and safer so that's where we're going to go now we're going to build some start and end g-codes based on different configurations and different firmwares and just talk about them in general and hopefully i can share a few tips so let's jump back into prusa slicer so that's really basic it doesn't do a whole lot at the beginning or the end of the print but before we get really involved let's go back we'll export this gcode and i'm just going to open it up with a text editor i use notepad plus plus but you can see how it builds the g-code it does enter some of the defaults in here from crucial slicer that's just for your information but here is the block for your start g-code you'll notice this 201 203 204 that's what i was telling you before about machine limits it automatically sets these if you have it set to marlin you can adjust them but that can kind of be interesting if you're going to go for certain firmware settings this is going to override them we'll talk more about how i get around that in a moment m107 it does try to turn all of your fans off by default that's going to turn off what i like to call fan zero or your part cooling fan a lot of this is just injected by default it's not even in start g code m190 that's to set your bed temperature it does that automatically when you have a bad temperature same for m104 when you have your hot end temperature set we installed the g28 with our start g-code as well as the nozzle lift then your m109 command is what makes the printer wait for the nozzle to come up to temp before it starts the print 104 sets the temperature or turns it on 109 makes it weight again it does all this by default but we want it to do it a certain way so we're going to go back and revisit this again by default it sets a g21 to make sure you're working in millimeters it turns on absolute coordinates and absolute distance for extrusion and then it resets your extrusion to zero when you have absolute coordinates that tells it to go to a location so if you tell it to go to five millimeters in z it goes to five from zero if you told it to go 5 in z again it's already at 5. if it was set to relative and you told it to go to 5 it would just advance it 5 millimeters if you told it 5 again it would advance it 5 more so hopefully that makes sense and then they set the g92e0 so that they can start from zero when they're counting the extrusion forwards and then retracting backwards and then any filament g code that you have is going to be inserted right here we don't have any and then the print starts you can see on the second layer right here we do a 0.4 remember our print is only two layers high before it started it it ran an m106 to start our part fan and then our ng code all the way at the bottom is even simpler it turned off the hot end g28x0 m84 to turn the motors off so hopefully that makes just a little bit more sense by default it does run an m107 again to turn the part fan off when the g-code ends but that's not anything we did that's just how the slicer functions so let's start with our ender3 machine here again this machine is pretty simple it does manual bed leveling no fancy features that we need to enable so it should be pretty straightforward some of these commands are going to be a bit redundant but i do like to put them in the start g code just so i know that they have been ran at the start of the print and the first code that i'd like to enter is g90 and i'll do the comments in here so it makes more sense but that is use absolute coordinates you're not in relative mode so when you tell it to go to 5 and y or x or z it goes to 5 millimeters from 0. you're not just adding the value over and over again most slicers and firmwares are going to assume this already and have it set correctly but if you want to use other commands inside your start and ng code or any of these other options this will make sure that you have the right setting to get that done now the next one i like to do is m83 we'll go ahead and put in our comment this sets the extruder to relative mode it's not as important to have the extruder in absolute because you're just extruding filament and retracting it so in this mode you can say i need five millimeters of filament it will kick out that much and you can tell it again i need five more it will kick out five more you don't have to keep incrementing it to 10 to 15 to get that amount of filament it just makes things easier the next line we want to deal with how the printer heats up we don't want to wait for the bed to heat to start heating the hot end on this system it's 24 volt even most 12 volt psus that we use now can handle this to heating at the same time so let's update that with an m104 and then we do s and i'm going to put an open bracket and here i want to use a variable for the first layer temperature that way we can flip out from filament to filament profiles and we'll never have to change the printer settings you don't want to hard coat anything in here you want to follow the filament setting and in precious slicer this is really easy because if we go over to filament settings and you just hover over the option you want here's the first layer temperature it's going to give you the parameter name or the variable name that you can use to get this done so we need first underscore layer underscore temperature so back to printer settings we'll just put that in there and then close the bracket and we'll add a comment we'll just call it set extruder temp then we want to do the same thing with the bed so let's do m140 s bracket and then it's going to be first underscore layer underscore bed temperature underscore temperature and we'll close our bracket and add a comment make sure you didn't mistype anything now this just turns the heaters on and it's going to set it to a certain temperature but we don't want to start the print we won't we don't want to move on until those temperatures have been reached and there's commands for that so m190 s and then we'll just copy in this first layer bed temperature m190 does the bed so we'll copy that in there wait for bed temp and then same thing with the hot end that is an m109 s first layer temperature wait for extruder temp so that'll take care of the heating then we move on to the home g28 that's fine right there but i don't need to lift the nozzle five millimeters before we start printing so we'll take that out instead right there i'm gonna do a g92 e0 that resets the steps for the extruder if it has taken any so gets it back into a default state so we know we're set at zero even though we're using relative mode then we're going to move on to entering some g code to create a prime line to get the hot end prime before we start the print so first thing we want to do is move outside of the print area so we're just going to do a g1 command a regular movement command we're going to go x0 we'll just go home and then let's do y10 that'll get us around that front clip on the print bed and make sure we're inside the print bed when we do our prime line and we'll just move at a feed rate with an f of three thousand and a quick comment now since we're in position let's go ahead and extrude let's do a g1 x60 so we'll move to x 60 millimeters and we're going to do e to extrude let's extrude nine millimeters at a feed rate of a thousand and we'll just call that prime line and let's do one more we'll keep it in the same line but we'll kick out just a little bit more filament in a shorter distance so let's do g1 x 100 so we're only going to move 40 millimeters this time and let's do e 12.5 so three and a half millimeters more than the first move in less space and let's do feed rate 1000 and we'll just call this prime line as well but this way we'll know that we have primed the nozzle successfully no matter what and then after we're done priming let's go ahead and reset our coordinate g92 e0 for the extruder back to zero just to make sure everything going forward counts it from zero and that's going to be a pretty good starting g code for a manually leveled bed a simple machine like the ender 3. now let's work on the ng code just a bit we're only shutting off the hotend heater when the print ends so we need to shut off the bed as well so let's do an m140 s 0 that will turn it to 0 so we'll just call it turn off bed and i want to make sure that the part fan has been turned off it does that in the g call already but again i like to have it in here just to make sure it's going to run so let's do an m107 part fan off then the g28 x0 that really doesn't do me much good but i do like to move the bed out on a bedslinger like this an i3 machine so that i can remove the part easy so let's just move it into position so let's do a g1 and we'll do x0 the same thing that the g28 home would do to get it all the way over there to the left but since this is a 220 220 bed let's do y200 just so we don't crash and take it all the way to the front 200 should be good enough to give us some room and we'll do that at a feed rate three thousand travel moves three thousand i'm going to use and then print moves 1000 just to make sure that extruder can keep up on the print moves and we'll just do move bad front and then the m84 disabled motors that's fine with me that'll disable the motors so that the next time if we need to level or or something like that it takes the power off of the motors so they're not no longer energized so that's in good shape so this should be all we need to do to get a decent result so let's go ahead and try that test print again so with our new file back to protoface you can see that we're heating the hot end and the bed at the same time so that's good and when we're up to temp we'll go ahead and home then we'll move outside the print area jump to 10 and y and then start our prime line when that's complete we'll start the regular g code and start on our print you can see the prime line it's a little thinner when we started a little thicker when we ended that's because of that e setting that we did in the start g code and the print's done we go x0 we bring it all the way out the motors are no longer energized factor pronterface both heaters have been turned off so this is a much nicer instruction set than it would be from a stock slicer profile now you'll notice we're still just a little bit off center here we're a little bit over to the left and there's a difference between build volume and actual print area they call the ender 3 a 220 220 x and y this plate is actually a 235 and i entered it as 2220 on purpose so i could show you what it's doing so a lot of times on printers when you see this issue that means the nozzle is not at zero zero when it's homed it's actually off the bed a bit and in that case you would just enter a negative number in the slicer in the print area the amount that it's off the bed here we're just short 15 millimeters on the bed size and that should be enough to get that print in the center so back into prusa slicer you can adjust that in the general tab bed shape just go to set and just bump it up to the print area 235 235 if you wanted to adjust the origin say your nozzle is off the bed when you're at your home position you would set these in negative so say it was negative 5 to the left of the bed when it was at zero zero it'll move this graph so you can tell where it's at that would enable you to get to the center that's how much movement the slicer has to tell it to get to the center of that bed but we should be good at zero zero just creating a larger print area so let's hit okay and let's try it one more time now you can see we're a little bit over to the right we're printing a lot closer to the center of the bed so that corrected that issue again it's probably better to correct that in the firmware than it is a slicer but some printers you don't have that option so that's our most basic of configuration on our ender 3 here but let's move to something just a little bit more interesting let's introduce auto bed leveling because there's a new set of challenges there so what about log here we don't have the manual bed leveling we do auto bed leveling with an inductive probe i also like to run the g30 forward command which helps balance out the x gantry make sure it's parallel to the bed by doing probes on either side of the bed now these are features that i have enabled with marlin and you do have to have two z drivers to be able to utilize them but i do have videos on how to configure that this is more about how to control them all in gcode so i'll show you what i do on my start g code with these features so let's just work with our ender 3 profile and then we'll build into a profile for log we have to add a few features a lot of this is going to be the same so we still want to switch to absolute coordinates with our g90 and your m83 to set extruder to relative mode but then the next line i'm going to enter is a g34 that does your x leveling so every time i print it's going to take multiple probes left and right first thing to make sure the x gantry is leveled out i do this on this machine because this one gets moved around a lot so you never know what state the gantry is going to be in also i don't heat the bed up before i take these probes because we're just comparing probes side to side it's not about the distance or the accuracy of the probe to the bed it's just if the probes are equal to each other so that's a good place for it a g28 and then automatically runs the g34 to get you leveled up then the next line we're going to go ahead and add another m104 command but we're going to do it just a little bit differently we're going to set a minimum hot end temp so let's do an s170 170 should be a good low temp for any filament pla on up and there's a reason why i like to do this and those who own a prusa mini there are some other printers that do it they do it pretty much the same exact way one of the biggest drawbacks to auto leveling if you get your hot end all the way up to temp is you're going to have spots of filament on the bed depending on how close your nozzle is when you're leveling doing it at a minimum temp that will keep the filament from dripping on your bed but it'll also allow your probe to get up to temp in case there's any skew as the temperature changes on the probe so you level at a lower temperature after that's done you increase your printing temperature and then you start printing so our first a104 is going to be this s170 we'll just put a common in there to set extruder temp for bed leveling then we can take out our original 104 command we don't need that quite yet then we'll use our m140 command to set our bed temp just the same as before then we're going to use an m109r command the s command waits for a certain temperature to be reached the r command waits for it to either cool or heat s is just on the way up so this is the more accurate command so we're going to use this to wait for our 170 and we'll just put weight for leveling temp then we can wait for our bed temperature just like we did before with the m190 and we can delete this m109 for the extruder temp we don't need that yet then we're going to g28 once again remember in this code the one i use g34 does home but it never hurts to do it again well g28 then after that we need to initiate our auto bed leveling with a g29 when the bed level is complete i am going to set the extruder temperature again with an m104 up to our printing temperature so just like we had in our previous config we'll do s and then in brackets first underscore layer underscore temperature close that bracket so now that the level's complete and we're heating up to our printing temperature now let's go ahead while it's heating move out of the bed area like we did before but depending on how you have your auto bed leveling set up you're going to need to make some adjustments here so let's go ahead and do our move we'll do g1 we're going to go x0 y0 and if you're wondering why you don't just want to do a g28 here it's because that will erase all of your leveling settings that you just did with your g29 there is a setting in marlin you can keep it from doing that but especially on an i3 machine i don't like to put that setting on here i want to know that it's pulled it in fresh every print and the reason why some bed leveling parameters can be different on my g29 it actually lifts the z after it's completed five millimeters so now i need to tell z where to go so we've moved outside the bed and i want to put z in a relatively good printing position so a first layer height so i'm going to do 0.2 your bed leveling has already been done so it shouldn't touch anywhere on your bed moving to this position you should be in good shape but it needs to be down to a relatively easy level to print or it's not going to print the prime line correctly when it starts into the actual g-code doing the g1 moves it will know where to go because of the slice g code but not in the prime line so just keep that in mind if you see it printing in air that's probably what the issue is you can also change these up a bit in your g29 if you want to and we'll just have it move at a feed rate of 3000 and put in our comment and we also need to tell it before you continue on with the rest of g code you need to wait until this m104 command gets to our first layer temperature we have to do the m109 again s and with our brackets we'll put in that first layer underscore temperature one more time close bracket wait for extruder temp and then we can continue on the g92 e0 to reset our extruder that's fine there then we can just leave the same intro line that we did on the ender 3. on this printer you notice on my outside print area i don't need to move y up because i don't have any clips or anything to dodge i can use a lot more of the bed area than i can on the other printer so i set these both to zero but for the prime line 60 for nine millimeters at a thousand and then for the other forty twelve point five millimeters at a thousand and we should be good and our ng code should be just fine the same as the other one all we need to do is turn the hot end off the bed off turn off our part fan then we kick the bed out y200 this one has a y210 so 200 is fine and then turn the motors off so i don't need to change anything up there now let's run this test g-code so i can show you what it does play-by-play with that g34 and the auto level so right when we hit print it's going to go ahead and start that g34 it does include a g28 homing sequence and it's going to start probing left and right to make sure that x gantry is nice and level you don't really need to do this with the bed on i might have mentioned this before because you're just comparing two settings here it's not really about how accurate the probe is as much how they are similar from side to side it shouldn't hurt this process at all if the bed isn't heated up and if you do want to run g34 every print a lot of times if it's very similar if you're less than 0.01 of deviation it'll only check it once you can set as many integrations you want i have five but most of the time you only need to go one unless you've turned it off or moved it around after it's complete we go home again and we should start preheating you can see we're going to our 170 our leveling temp and our 60 degree on the bed we'll wait for that we're up to our leveling temps we're going to go ahead and start our leveling sequence once that's complete we'll go outside of our bed area and you can see the extruder went up to our printing tip to 10 and we'll wait for that we're printing our prime line and then on to our print print's complete we kicked the bed out just like before we go x to zero and the motors are off back to the slicer and of course there's lots of different things you can do in here one of the most common things i see if you have a printer that doesn't have the eprom enabled and you need to switch out your extruder and change some e-steps you can do that right here in the start g-code because it's going to be printer specific you'll have your own configuration per printer and i would do that right up here at the beginning so if you need to change your e-steps you just do an m92 e and then whatever those steps might be so say we were changing out to a bond tech we do 415 so that's one of the handy things you can do in start g code and as a side tip the m400 command so say you did some sort of command that wasn't getting registered when you started your print sometimes if the command has to wait then the g-code will just blow by it and not run it all together i've seen that a couple of times well you can enter an m400 let's say your g29 wasn't running when you started your print the m400 makes the script stop because it is completely linear it reads top down 400 makes it stop and clear out everything and make sure everything is complete before it goes to the next line so if you're seeing an issue like that m400 can be really handy and it's compatible with pretty much every firmware i've ever seen so that might get you out of a jam and let's go back to general just for a second and talk about this g-code flavor now log does run marlin but by default in prusa slicer like i said before if you select marlin it thinks it's going to be for a prusa printer so it imposes these machine limits and if you don't want to have to change all these machine limits to fit your printer you don't want the slicer overriding your firmware values the easiest thing to do is just to go back to general and switch over to wrap wrap because they are going to be extremely similar all of the vanilla commands that the slicer is going to use between marlin and reprav are going to be almost identical now a few feature specific commands of course will be different but nothing that's going to change how your printer prints so just keep that in mind if you use prusa slicer so there's marlin and some very basic start and end g-code configurations you can do and how the slicer treats those configurations this is kind of a primer to get you into the slicer and figure out what those commands are doing and how to look at the raw g-code to tell where they fall in line so hopefully that makes just a little bit more sense but let's take a look at reprap for a moment so we're going to be taking a look at the configuration for the basement cube here it's core x y that really doesn't matter in your g code at all but it is a fixed bed and reprap does leveling just a bit differently than marlin does if you have multiple z motors and multiple z drivers they're all separated out you can do a true leveling it kind of does the same thing that a g34 does in marlin but it can do it every time so it can actually alter from corner to corner to get you a nice level map also with a fixed bed printer like here most of the time you're not going to level every print it's going to be really stable you just want to brush up on your level with that g32 we're going to see that in a minute and keep the same mesh just load it over and over we'll talk more about that but let's jump back to prusa slicer and we're going to start where we left off with the last one what's the difference between marlin and reprap inside the slicer setting so over here on the left this is the same file that's been sliced with that marlin setting on this is one that's been sliced with reprap and there's a few gotchas here it's fine to use the reprap file on marlin because it doesn't add any of those machine limits in here but you can't use the marlin file on the reprap machine because a lot of these settings don't exist and it isn't so much actually that they don't exist the m205 doesn't that's actually an m566 in reprap that sets junction deviation or jerk values as you might know them but 201 203 204 they're all there but it sets those settings in millimeters a minute marlin uses them millimeters a second so if you see your printer doing really really slow movements where it shouldn't be check that marlin rep rep setting in the slicer that might be the problem so now let's head over to the dwc and talk about the configuration a bit before we get to the slicer and let's go to system and take a look at config.g by default you're going to use an m563 command i did want to mention before we go much further that this is reprap version three so there are some changes that are different from the previous versions that's all on the reprap wiki if you need to figure out what's different there but this is a pretty new version so this m563 that defines your tool and you don't have to call a tool if you only have one it's going to default to tool zero it's not even going to be in the g code reprap will just know how to do that so that's important to mention when you make calls if you have more than one tool or you need to select a specific one you'll have to update the g-code file or put it in some sort of macro inside the dwc so that it can call it but since we only have one tool head that's not a big deal just wanted to mention it and if we jump out one if your printer you're running reprap if it's doing something you don't expect it to do especially with your start g code like we're going to deal with today make sure you don't have a config dash override in here i've deleted mine that is the sudo style of eprom it's actually a config file that gets loaded after you re-root the printer so you can use it like eeprom to save quick commands you even use the same m500 commands to alter it but that can make things really confusing also as far as leveling goes let's jump to the dashboard because i think it makes a little bit more sense and we'll pop open this compensation calibration currently we have no mesh loaded remember that we're going to talk about in a second you can see we have a g32 for true bed leveling and then you have the g29 now the g29 actually creates the mesh that's how it knows what is a low spot what is a high spot when it's moving around the printer to compensate for an unlevel bed or carriage the g32 is actually reading the bed.g file it probes multiple points and if there's an inconsistency problem then it will adjust each z motor that you have configured i have four so you can actually alter all four points if there's a problem again kind of like that g34 in marlin but it doesn't impact the mesh it gets your gantry as level and parallel with the bed as possible before you even do your compensation so on a fixed bed like this you would run your compensate your true bed level your g32 and then build your mesh then it will save that mesh going forward you don't have to rerun it every time so that's important to mention the g32 let's jump back to system real quick bed.g is what it actually runs here's all the commands that get run when you do that g32 command this is the location of the pro point for each one of my z motors and how to make that probe happen so that should make the start g code that we're getting ready to look at make a little more sense now onto the slicer and here's the start g-code that i use for this printer the g90 m83 that's exactly like marlin and so is the m104 s command so we're setting a bed leveling temp before we start the print on some versions of reprap they don't support the m109 command with the r value where you can actually wait for it to heat or cool the accuracy amount but this version does i couldn't find the documentation on how it supports this now but it does in fact support it so go ahead and use it on reprap going forward so we're going to wait for that bed leveling temp and once we're up there we're going to do our home g28 and then we're going to run that g32 to make sure the plane hasn't changed on a fixed bed i just run the g32 then the 29 and save that 29. it's not going to change that much we're just going to load it from the first slot there's a couple of slots you can save if you have a different sheet that you use on your printer you can save multiples i just have one here so i do a g29 s1 to load that mesh then everything else from there on is pretty much the same after we do our checking the plane with our g32 we loaded our mesh then we do the m104 to get up to our printing temp then we move outside the bed area remember i'm using the z 0.2 because the bed level does leave it at z5 just like marlin did we wait for a printing tip and then we do a prime line here in the ng code i'm doing things that are very similar to marlin i do have a weight in here sometimes that helps if you have a weight before you run the ng code and instead of calling zero parameters i'm just doing the g28 x and y that's because i'm going to disable the motors right after that that will make it call a home again so you would have to re-home if you run an m84 because it's going to lose track of where it was and it's going to have to home again to get back to zero g29 s2 that's going to unload the mesh so now mesh bed leveling will be off it's good to turn that off because if you interact with the printer when you're not in a printing scenario you haven't started a print that mesh being set all the time can throw some things off and get a little confusing so turn it off when you're not using it turn it back on when you are that's what you saw up here in the start g code and now that i look at this g29 s2 i might have explained this a little bit poorly at the beginning let's go back just for a second this g29 s1 that doesn't necessarily mean that's the slot i think i referred to it as loading mesh from slot one so that's how like ubl would do it you can save multiple slots on reprap you actually pull it from a csv file a height map so this pulls it from the default height map i think i actually incorrectly explained that before i didn't want to go back and do the edit but you're actually pulling from heightmap.csv that you created when you ran this the first time you can save multiples if you wish but you'd have to flip that file name out or create a macro that does it so back to the ng code sorry about that we turn the mesh bed leveling off and then we set the extruder and the bed temp to zero and it's important to mention as well you turn these to zero and you turn them off that doesn't make them not active this is after a print has been completed you can see heater one heater zero are still active they're just set to zero you would use the t0t1 the tool commands to actually switch these out you can also use those commands to set active and standby temperatures automatically but it really doesn't do you much good unless you have multiple tool heads so let's go ahead and kick this off just so i can show you the play by play here i kicked off the file we set our bed to our 60 degree or active temp and then to our leveling temp on the hot end after we're up to temp we're going to go ahead and home then we'll do our g32 we're going to tap all four of those locations that are defined in bed.g after that's done you can see the deviations here in the dwc those will be in the console if you want to check those out for those four probe points also from the dashboard you can verify that it reloaded that mesh from that csv file right here you can see it'll be meshed right here it'll say none if the mesh hasn't been loaded and up here you can see it turn the active temp to 210 our printing temp once up the temp it's going to start our prime line and then move right to our print it is important to remember too if you're setting feed rates and things for reprap make sure you check the guide out to make sure those are either feed rates in millimeters a minute or millimeters a second pretty much everything in marlin is per second some things in reprap are per minute just keep that in mind prince complete we're gonna home x home y part fans off motors have been deactivated you can see everything needs to be homed again that's another way you can verify that it turned all the motors off and now your compensation and use is none the mesh bed leveling has been unloaded so there we go just a handful of quick tips about g-code and how they affect your printer and this might be catered towards a newer 3d printing user but i thought it was kind of important to get this out there because there's more and more technology coming out that allows you to easily and affordably use reprap and there is just a little bit of difference in between reprap and marlin and this might get you started creating your own custom profile especially if you like to use crucial slicer like i do because it has more and more features coming out for it all the time so hopefully you found this helpful that is it for today and i'll see you very soon on the next one
Info
Channel: Chris Riley
Views: 19,575
Rating: undefined out of 5
Keywords: 3D, printer, Printing, 3D Printing, 3D Printer, ChrisBasement, ChrissBasement, Chris'sBasement, Chris Basement, Chriss Basement, Chris's Basement, ChrisRiley, Chris Riley, benchy, 3dbenchy, 3d, Gcode, Prusa Slicer, marlin, Rep Rap, reprap, basics, ender3, ender 3, exo-cube, log, prusa
Id: nsRntOH_DdQ
Channel Id: undefined
Length: 51min 44sec (3104 seconds)
Published: Wed Mar 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.