Category Archives: 3dprinting

Supported G codes · prusa3d/Prusa-Firmware Wiki · GitHub

Supported G codes

PavelSindler edited this page on Oct 30, 2017 · 17 revisions

This page is under construction!

G-codes

G0 & G1

Move

G2 & G3

Arc move.

G4

Pause the machine for a period of time.

Parameters Pnnn Time to wait, in milliseconds Snnn Time to wait, in seconds

Example G4 S2 Waits for 2 seconds.

G10

Retract

G11

Retract recover

G28

Home axis

Examples:

G28 W Home x, y and z axes.

G28 Home x, y and z axes and then runs mesh bed leveling (G80).

G30

Single Z Probe

G76

Induction probe temperature calibration.

Induction probe (PINDA) detection distance increases with temperature. This leads to need of adjusting live adjust Z values often, expecially when printing with different materials. Main contributor to PINDA temperature shift is heat received from heatbed.

G76 runs temperature calibration, which consist of preheating PINDA probe near the heatbed surface for different heatbed temperatures and measuring how its detection distance changes. Measured detection distance shifts are saved to EEPROM.

When new print is started and using temperature calibration is turned on in Calibration -> Temp. calibration menu, PINDA probe is preheated for two minutes near the heatbed again to achieve defined temperature. Then mesh bed leveling is run and Z axis shift counted from temperature calibration data is applied. Then live adjust Z is applied.

G80

Mesh bed leveling

G81

Print mesh bed leveling status and bed profile if activated

G86

Prusa3D specific

Disable babystep correction after home. This G-code will be performed at the start of a calibration script.

G87

Prusa3D specific

Enable babystep correction after home. This G-code will be performed at the end of a calibration script.

G90

All coordinates from now on are absolute relative to the origin of the machine.

G91

All coordinates from now on are relative to the last position.

G92

Set position to coordinates given without physical movement.

G98

Activate farm mode

G99

Deactivate farm mode

M-codes

M0 & M1

Wait for user to press the knob. This command can be used without additional parameters or with:

Pnnn Time to wait, in milliseconds Snnn Time to wait, in seconds

Examples: M1 Waits until user presses the knob. “Wait for user…” message is shown as LCD status message.

M1 S2 Waits until user presses the knob. Max. waiting time is 2s. “Wait for user…” message is shown as LCD status message.

M1 Hello World Waits until user presses the knob. “Hello World” message is shown as LCD status message.

M17

Power all stepper motors.

M20

List SD card

M21

Init SD card

M22

Release SD card

M23

Select file

M24

Start SD print

M25

Pause SD print

M26

Set SD index

M27

Get SD status

M28

Begin write to SD card.

Example: M28 filename.gco File specified by filename.gco is created (or overwritten if it exists) on the SD card and all subsequent commands sent to the machine are written to that file. Writing to file is terminated with M29.

M29

Stop SD write.

M30

Delete SD file

M31

Show time from print start.

M32

Select file and start SD print

M42

Change pin status via gcode

M44

Reset XYZ calibration

M45

XYZ/Z calibration

Example: M45 Runs XYZ calibration.

M45 Z Runs Z calibration.

M47

Show end stops dialog on display. Wait for user to press the knob.

M82

Set E coordinates absolute.

M83

Set E coordinates relative.

M84

Turn off steppers.

M85

Set inactivity shutdown timer.

M92

Set axis steps per unit.

M104

Sets target temperature for nozzle. Example: M104 S210 Sets nozzle target temperature to 210 C.

M105

Returns current temperatures.

M106

Turn on printer fan.

M107

Turn off printer fan.

M109

Set target temperature for nozzle and wait for nozzle to reach target.

M110

Reset line position.

M112

Emergency stop

M113

Set or get host keepalive interval.

M114

Current position on serial.

M117

Prints custom status message on LCD.

Example:

M117 Hello World

M119

Report current endstop status on serial

M120

Disable endstops

M121

Enable endstops

M140

Set heatbed target temperature. Example: M140 S60 Sets heatbed target temperature to 60 C.

M190

Set heatbed target temperature and wait for heatbed to reach target.

M203

Set max. feedrate in mm/sec.

M204

Sets acceleration.

S – normal moves

T – filament only moves

Example: M204 S1000

M205

M207

M208

M209

M220

Set speed factor override percentage.

Exmaple:

M220 Sxxx -sets speed factor

M220 Sxxx B -backups current speed factor and then sets new speed factor

M220 B -just backups current speed factor

M220 R -restore saved speed factor

M221

Set extrude factor override percentage.

M226

M300

Activate beeper

M301

Set PID values

M302

Allow cold extrude or set cold extrude limit.

M303

PID autotune

M304

Set hetbed PID values

M350

M351

M400

Finish all moves

M500

Store settings to eeprom

M501

Read settings from eeprom

M502

Revert to default settings

M503

Print settings currently in memory

M509

Force language selection. This command will invoke language selection menu after reseting/rebooting the printer.

M600

Pause for filament change.

M601

Long pause

Suitable for pausing sd card print. Long pause print procedure contains seting nozzle target temperature to zero, moving extruder to pause print position and turning off print fan. When nozzle cools down nozzle fan is also turned off and printer remains silent during pause. Heatbed remains heated during pause print to maintain good attachement between printed object and heatbed. In pause position heatbed with printed object is moved foward to make printed object accessible.

M602

Resume SD card print from long pause. Previous print settings (fan speed and feemultiply, nozzle target temperature) are restored. Time when the printer is paused is not counted to print time statistics.

M701

Load filament

When using multi material printer M701 loads filament in currently active extruder.

M702

Unload filament

Multi material usage:

With multi material firmware, it is possible to unload all filaments, all filaments which were used during previous print or just current filament.

Example:

M702 Unloads all filaments

M702 U Unloads all filaments used during print

M702 C Unloads filament in currently active extruder

M907

Set stepper motor current

T-Codes

Select tool. This is used with multi material printer for switching between extruders.

Example:

T0 First extruder (counted from the left) will be used.

T? Envokes menu on LCD display for selecting which extruder to use.

PRUSA-codes

PRUSA Ping

Works only in farm mode. This code serves for checking that communication is not broken.

PRUSA PRN

PRUSA Fn

PRUSA fv

Source: Supported G codes · prusa3d/Prusa-Firmware Wiki · GitHub

OpenSCAD Linkages Library by machineree

OpenSCAD_Linkages_Library OpenSCAD library to create multiple types of mechanical linkages in 2D and 3D. Thingiverse Thing: 2081445 Check out on GitHub Check out http://machineree.com/#openscad for more information and projects. v.02 – February 5, 2017 linkages.scad: 2D & 3D linkages in one library Added help function: linkagehelp(); Added linkwidthangle, linksurroundangle in 2D & 3D for angled flat bar linkages with 2/3 holes Renamed modules to fit scheme Changed slots in linkwidth & linksurround to true/false scale(in()) for inches scale(cm()) for centimeters v.01 – January 31, 2017 linkages.scad: 3D Linkages linkages2D.scad: 2D Linkages to be exported .SVG or .DXF linkageex.scad: examples of some of the operations and functions of the library Add to your library folder in OpenSCAD and use the include function to begin using these modules. include OpenSCAD Libraries (Manual) Default units are mm. 3D Linkages linkwidth(holeD,width,length,thick,slot=false); holeD: diameter of the holes at each end width: width of the part (must be greater than holeD) length: distance between outer holes from center thick: thickness of the part or Z value slot: true for a slot linkwidththree(holeD,width,length,thick,three); holeD: diameter of the holes at each end width: width of the part length: distance between outer holes from center thick: thickness of the part or Z value three: distance a third hole is from the first hole, choose length/2 for center hole linkwidthrot(holeD,width,length,thick,rot); holeD: diameter of the holes at each end width: width of the part length: distance between outer holes from center thick: thickness of the part or Z value rot: angle of rotation for the second hole to create angular linkages linkwidthangle(holeD,width,length1,length2,thick,angle); holeD: diameter of the holes at each end width: width of the part (must be greater than holeD) length1: distance between holes from center, first section length2: distance between holes from center, angled/second section thick: thickness of the part or Z value angle: angle of second section referenced from first section linksurround(holeD,surround,length,thick,slot=false); holeD: diameter of the holes at each end surround: distance from the edge of the hole to the edge of the part length: distance between outer holes from center thick: thickness of the part or Z value slot: true for a slot linksurroundthree(holeD,surround,length,thick,three); holeD: diameter of the holes at each end surround: distance from the edge of the hole to the edge of the part length: distance between outer holes from center thick: thickness of the part or Z value three: distance a third hole is from the first hole, choose length/2 for center hole linksurroundrot(holeD,surround,length,thick,rot); holeD: diameter of the holes at each end surround: distance from the edge of the hole to the edge of the part length: distance between outer holes from center thick: thickness of the part or Z value rot: angle of rotation for the second hole to create angular linkages linksurroundangle(holeD,surround,length1, length2,thick, angle); holeD: diameter of the holes at each end surround: distance from the edge of the hole to the edge of the part length1: distance between holes from center, first section length2: distance between holes from center, angled/second section thick: thickness of the part or Z value angle: angle of second section referenced from first section 2D Linkages linkwidth2D(holeD,width,length,slot=false); holeD: diameter of the holes at each end width: width of the part (must be greater than holeD) length: distance between outer holes from center slot: true for a slot linkwidththree2D(holeD,width,length,three); holeD: diameter of the holes at each end width: width of the part length: distance between outer holes from center three: distance a third hole is from the first hole, choose length/2 for center hole linkwidthangle2D(holeD,width,length1,length2,angle); holeD: diameter of the holes at each end width: width of the part (must be greater than holeD) length1: distance between holes from center, first section length2: distance between holes from center, angled/second section angle: angle of second section referenced from first section linksurround2D(holeD,surround,length,slot=false); holeD: diameter of the holes at each end surround: distance from the edge of the hole to the edge of the part length: distance between outer holes from center slot: true for a slot linksurroundthree2D(holeD,surround,length,three); holeD: diameter of the holes at each end surround: distance from the edge of the hole to the edge of the part length: distance between outer holes from center three: distance a third hole is from the first hole, choose length/2 for center hole linksurroundangle2D(holeD,surround,length1,length2,angle); holeD: diameter of the holes at each end surround: distance from the edge of the hole to the edge of t

Source: OpenSCAD Linkages Library by machineree

Gottlieb EM pinball Coin Door hack by f2knpw

I wanted my Fast Draw gottlieb pinball to “free play” There is a solution to short the zero_Position swotch on the Credit Unit. But this solution is now totally “clean” for me as you don’t see the credit, the game starting immediately when you push the replay button… So I have created this part that you can insert into the coin back lever in the door. Now when you push the coin back button you get a free play, the credit counter increments properly. And if you want to use this credit, simply push on the replay button ! https://youtu.be/r5GKp98Q4KA

Source: Gottlieb EM pinball Coin Door hack by f2knpw