G1, you are see above is called the move command. This is arguably the most important G-code as it allows you to move the printer. Each G-code command consists of a letter followed by a number.
T0are all valid G-code commands as well. The Duet Maestro control board runs RepRap Firmware. This firmware determines what commands are valid, and which commands are not. You can find all the valid commands that you can send in a long list on the RepRap Wiki G-codes Page. After the initial letter-number combination of the G-code command a parameter can follow. This is also visible with the G-code commands listed above, the command
G1 X248.843 Y182.581 E0.0438has
X248.843 Y182.581 E0.0438as parameters. Many different G-code commands have optional parameters that can be entered after the initial command.
G1command you can move the printer. However, where the
G1command moves your printer depends on whether you are in absolute or relative mode. Absolute mode is enabled whenever you send the command
G90, relative mode is enabled when you send the command
G91. Whenever you are printing absolute mode is typically enabled. If you restart your printer, absolute mode will also be enabled. If you send the command
G1 X150 Y120 Z100in absolute mode (
G90), the printer will move to the position X = 150mm, Y = 120mm and Z = 100mm, relative to the origin. If you send the same command in relative mode (
G91), it will send the printer 150 mm in the positive X-direction, 120 mm in the positive Y-direction and 100 mm in the Z-direction relative to where the printer currently is positioned. The same command can send the printer to two completely different places depending on what mode you are in. As you saw in one of the commands above, the move command,
G1, can also have an
Eparameter, this allows for a movement of the extruder motor.
Eparameters which allow the printer to move each of the motors, there is one other important parameter
Fis the feedrate of the motor, or is simple terms, the speed that the motor will travel at. The units of the
Eparameters is mm. However for
For feedrate the units are
mm/min. A normal travel feedrate (speed) would be 3000mm/min, but for printing the feedrates are typically much lower.
G91enables relative mode, so the next move command that is sent will be with respect to the printers current position and not the origin. After the
G91command, the move command
G1is sent. This sends the printer 10mm in the positive X-direction at a feedrate of 6000mm/min. The
M121commands are stack push and pop. If you are not familiar with these two programming terms, then don't worry, they are not important to know for a beginning user. All you have to know is that it will disable relative mode
G91and return to absolute mode
G90. This is because you want the printer to be back in absolute mode after pressing the move buttons.
G1 X100 Y100. This will move the printer to 100 mm X and 100 mm Y. Send the command
G1 Z50. This will move the bed to about 50 mm from the nozzle. You can keep sending commands to move the printer around the build space. The table below represents the limits of the printer, the firmware should prevent you from going past these limits. Still, try to keep your move commands within the build space of the printer. You can also try to change the feedrate of the printer to see how the speed of the printer changes as the printer moves around.
this format. That typically means you can execute the G-code command. Comments are denoted by any text following a semi-colon ";". A new line will end the comment.
G1 X100 ; This is a comment!