Page 1 of 1

M301 Printer supported g-code commands list

Posted: Thu Dec 15, 2016 2:24 am
by Veenoh
Is there a list available of supported g-code commands for the M301 firmware? (Preferably with descriptions/notes)

Thanks.

--Dave

Re: M301 Printer supported g-code commands list

Posted: Sat Dec 17, 2016 5:42 am
by Veenoh
I got the following list from Geeetech.

Note that if the homing command (G28) includes x, y, and or z flags, the printer will home those axes individually, sending the head into the tower it is not near the top, and returning the max value (300) as the coordinate if it is near the top and can be homed. Delta printers are supposed to ignore those flags and I think Geeetech will correct this in the next version. This is a big problem for Repetier-Host on the Mac and Octoprint since they do include those flags. The workaround is to send the G28 directly to home rather than using the buttons. Both have scripting capability so this is not a big deal as long as you remember to avoid the buttons.

Code: Select all

* -----------------
 * Implemented Codes
 * -----------------
 *
 * "G" Codes
 *
 * G0  -> G1
 * G1  - Coordinated Movement X Y Z E
 * G10 - retract filament according to settings of M207
 * G11 - retract recover filament according to settings of M208
 * G28 - Home one or more axes
 * G90 - Use Absolute Coordinates
 * G91 - Use Relative Coordinates
 * G92 - Set current position to coordinates given
 *
 * "M" Codes
 *
 * M17  - Enable/Power all stepper motors
 * M18  - Disable all stepper motors; same as M84
 * M20  - List SD card
 * M21  - Init SD card
 * M23  - Select SD file (M23 filename.g)
 * M24  - Start/resume SD print
 * M25  - Pause SD print
 * M92  - Set axis_steps_per_unit - same syntax as G92
 * M104 - Set extruder target temp
 * M105 - Read current temp
 * M106 - Fan on
 * M107 - Fan off
 * M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
 *        Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
 *        IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
 * M114 - Output current position to serial port
 * M115 - Capabilities string
 * M117 - Display a message on the controller screen
 * M119 - Output Endstop status to serial port
 * M140 - Set bed target temp
 * M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
 *        Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
 * M220 - Set speed factor override percentage: S<factor in percent>
 * M300 - Play beep sound S<frequency Hz> P<duration ms>
 * M301 - Set PID parameters P I and D
 * M304 - Set bed PID parameters P I and D
 * M500 - Store parameters in EEPROM
 * M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
 *
 * "T" Codes
 *
 * T0-T3 - Select a tool by index (usually an extruder) [ F<mm/min> ]
 *

Re: M301 Printer supported g-code commands list

Posted: Sat Dec 17, 2016 4:36 pm
by Cup
Hey,Dave
Awesome,thanks for sharing :)

Re: M301 Printer supported g-code commands list

Posted: Wed Aug 29, 2018 9:08 pm
by koebes1954
This list is pretty useful, but it would be nice to have the complete syntax that use used. Also: How is the second extruder controlled - if you have a dual extruder printer? Is it G2? Which coordinated do you have to set when using the second extruder?

Re: M301 Printer supported g-code commands list

Posted: Wed Oct 17, 2018 11:27 am
by 3dw
The last command probably gives the answer on how to select the extruder.....
It states T0 - T3 - select a tool by index.
(Usually an extruder.) - I might try setting up an external arm robot as an extra tool. Then when the print is finished thed arm bot can remove the print (after the bed temperature has reached the target threshold where the item can be moved with minor force.)