Hot answers tagged

22

The G-code to delay is G4. G4 P60000 will wait for one minute. The P is in milliseconds. Some firmware also accept a S Parameter that has the seconds. So, if supported, G4 S60 would do the same thing. The details for this and all other G-codes are documented here.


15

My understanding is that this occurs when the object is not a true solid. Since an STL holds the triangulation of each face and spline, the slicing engine is not "smart" enough to determine if there is a gap in the model and therefore if it should be filled in and how. When the slicer encounters a gap, it will either treat the endpoint as the end ...


14

An alternative solution to using a hard delay with the G4 dwell command, is to increase the time that the temperature set with M109 has to be held before it continues with the next command. In Marlin, this setting is named TEMP_RESIDENCY_TIME, and can be found around line 150 in Configuration.h. By default, this is set to 5 seconds, which looks like: // ...


13

That is a checksum. It's added by the host software to the G-code, to allow some basic verification by the firmware that the G-code was transmitted unchanged. It doesn't change the meaning of the G-code, and what your sequence actually represents is just M106, G28, M107. The N0,N1,N2,... are line numbers, and the combination of line numbers and checksums is ...


12

The G92 command is used to set the start position (origin) of one of more axes (including the current extruder) to any arbitrary value. The command G92 E0 is often used to perform retraction and nozzle priming. For example, the following commands are often used in start-gcode sequences (prologues) to prime the current extruder by extruding a small amount of ...


12

This is not universally valid G-code, and how it is handled depends on the implementation. You can use this style of comment on some machines, but not all. The way parsing used to be implemented in Marlin (a very common 3D printer firmware), it would work fine unless the comment string included a X, Y, Z, E or F character. The parser simply looks for the ...


11

You can trick the printer into applying an offset using the G92 command: G0 Z0 G92 Z0.1 First, we move the nozzle to Z=0. Next, through the G92 command, we tell the printer to, from now on, treat the current position as Z=0.1. This effectively applies an offset of -0.1 to the Z-axis, since if we now executed G0 Z0 again, the nozzle would move down 0.1mm. ...


11

Yes, it has been done before, see here and here. The README file of the first repository linked above contains a detailed explanation of the basic idea/calculations involved. A short excerpt: As you can set the parameters of G1 in such a way as to precisely control the velocity and the distance of a movement along a certain axis, you can control the ...


11

There are several programs that could serve as a console to connect to a printer, put let's start somewhere: the USB connection. Connection with USB When connecting the printer via USB for the first time, we will get a notification that some unknown item is connected. If we use windows we can learn what device it decided we now have via the device manager (...


8

G-CODE can be confusing as historically it was developed for machining tools rather than FDM printers, and thus: not all available commands make sense for a 3D printer some of the command do slightly different things than those one may intuitively think they do. Typically, Cartesian printers use 4 "axis": X, Y and Z for moving the printhead in space and E ...


8

The lazy way: Skirt/Brim With my TronXY X1 I learned pretty fast, that this first bit of extrusion on an unheated bed can totally mess up the first layer by being just in the way, as explained in the question. To some degree, this behavior can be avoided by adding a skirt of a certain length. An equally good alternative that also increases bed adhesion for ...


8

Note that this reference states that: Because the behavior of G28 is unspecified, it is recommended not to automatically include G28 in your ending GCode. On a Cartesian this will result in damaging the printed object. If you need to move the carriage at the completion of a print, use G0 or G1. So you need to use a G0 or G1 move. When using Ultimaker ...


7

Marlin does allow one to change the size of the buffers, in Configuration_adv.h. In the current version there's an ifdef that switches between two cases, one with SD support, and the other without. Both have a movement planner of size 16, which can be adjusted. Additionally, in the same file, BUFSIZE can be changed to modify the size of the buffer storing ...


7

For Cura 3.1(?)+: Install the plugin: Menu / Plugins / Browse Plugins... / scroll to "Z Offset plugin" <-- Install Configure the setting: Printer Profile / Print Setup / Build Plate Adhesion / Z Offset set positive value for nozzle liftup set negative value to bring nozzle lower for first layer (like -0.1 for your wanted scenario)


7

I actually did this, on my Malyan M150. After not that much experimentation at all it turned out that the frequency of the produced tone scales linearly with the speed of the motors. Due to the nature of the way humans perceive music, the actual frequencies do not matter at all, just the relative difference in frequency between the tones. This means that ...


7

Yes, G-code is read line by line. G-code is a numerical control programming language. It basically instructs the machine sequentially line by line to do a specific task. The printer than executes the lines one by one until it reaches the end. If you instruct the printer to wait (G4 dwell), it will do the wait/dwell first and than will execute the next ...


7

By connecting to the D9 output header (see RAMPS 1.4 shield schematic below) you only have 2 wires that represent a scheduled load and ground. You actually need to connect the positive (red) lead to the power supply 12 V and the negative (black) lead to the ground. The third wire (usually a different color) needs to be connected to the actual D9 in your ...


7

Let's put the parts one by one: Wait for bed temperature being at 30 °C: M190 R30 Play Bleep for 1/5th of a second: M300 S440 P200 Wait for 1/5th of a second: G4 P200 That gives: M190 R30 M140 S0 M300 S440 P200 G4 P200 M300 S440 P200 G4 P200 M300 S440 P200 G4 P200 M300 S440 P200 G4 P200 Just for 0scar: M300 S1396.91 P400 ;f7 G4 P400 M300 S1661.22 P600 ;...


7

TL;DR Short answer: "There is no difference!". Long answer G-code is parsed line by line. The parser in the firmware reads the command and the options (also called parameters) following it, comments are discarded. Therefore, option S should be followed by a Boolean value 0 for False or 1 for True. Without a value it is undefined and should be ...


7

Quote of comment of R.. GitHub STOP HELPING ICE on question reads: Pretty sure it is NP-complete (equivalent to travelling salesman problem), no? – This is correct; this is route optimization at its purest, and is by no means a new problem. You want to travel the shortest total distance between all vertices of what's essentially a totally-...


6

The issue was due to a corrupt SD-card, which was occasionally having some garbage read from it. It turns out that Marlin will try interpret a corrupt move command like G0 X1q3.54 and still read as many numbers as it can. In this example, it would be interpreted as G0 X1 rather than (as might have been intended) G0 X103.54. This explains my symptoms ...


6

It's not a bad idea, and you should try it. But only on prints with some height, because: The goal of the heated bed is to ensure adhesion for the first few layers. Without the heat on the bottom side of the layer, the layers above will pull those layers with it as they cool, causing the warp that you see. When your bed is warmer than the layers above, ...


6

First of all, there are some nice open source analyzers written in JavaScript that you can use online, or read the source to, at https://www.gcodeanalyser.com/ and http://gcode.ws/. Their predictions don't fully match actual printer firmware, but they do a reasonably close job, and reading them would be informative. Basically, the story behind acceleration ...


6

To supplement the accepted answer, and answer a question in the answer's comments (which should not be there), consider the E value as another axis - the axis of the filament. If you executed: G92 E0 ; Reset the extruder's origin G1 F200 E3 ; Extrude 3 millimetres of filament at a rate of 200 units per second and then went on to printing, the first ...


6

You can use: G91 G1 Z10 G91 make the printer use ralative positioning, while G1 Z10 would move the gantry up of 10mm, reagrdless of its actual position. In order to understand what's going on, you could experiment with the position of those lines in the script. The safest bet it to insert them at the very top, but you could insert them straight after the ...


6

The answer is that it depends on the type of firmware you are using. Let us look at the documentation of G4 to find that G4 is valid for all the listed firmware types: Pause the machine for a period of time. Furthermore it states that: Parameters Pnnn Time to wait, in milliseconds (In Teacup, P0, wait until all previous moves are finished) ...


6

T stands for "Tool" and has its origin in the origins of .gcode being for other automated machine controls. Depending on the machine, everything could be a tool for .gcode, like an actuator or pump or a spindle motor or a drill. In 3D printers, the T-controlled tool is usually the extruder motor. Convention has it that the indexing always starts at 0, so T0 ...


6

You can put the speed to 100 % by G-code command: M220 S100. The M220command is described here. Know that speed changes sent to the printer have an effect on the next printed layer, it first finishes the current layer at the speed commanded before starting printing the layer.


6

I would have liked to answer linking to credible official sources, but I cannot add references either on direct B-spline printing. So I'm writing down my thoughts. I've familiarized myself in B-splines to understand what they are and read into the 2 references given by the OP. Basically, the printer software only allows printing of straight lines. Yes I ...


6

Ultimaker Cura contains "Extensions"; in version 4.1.0, the process is as follows: Extensions -> Post Processing -> Modify G-code Add a Script -> Pause at height Choose the one that matches your firmware! Choose the Pause height to match the height the insertion should take place. Usually, this is to be the layer just before the roof is to be printed to ...


Only top voted, non community-wiki answers of a minimum length are eligible