Difference between revisions of "Gcode Basics"

From Hyrel3D
Jump to: navigation, search
Line 3: Line 3:
 
| __TOC__
 
| __TOC__
 
|}
 
|}
 +
 +
== Start Gcode ==
 +
 +
This code should be at the beginning of every Gcode file:
 +
 +
<nowiki>
 +
M757 S[nozzle_diameter] ;set layer/path width
 +
M729 S3 ;set 16 step mode
 +
M758 S0.095 ;set steps/nL
 +
M734 F60 ;set error reporting interval for redundant errors to every 60 seconds
 +
;--------------------</nowiki>
 +
 +
== End Gcode ==
 +
 +
This code should be at the end of every Gcode file:
 +
 +
<nowiki>
 +
;--------------------
 +
;M721 ;unprime
 +
M103 ;stop extrusion
 +
M104 T10 S0 ;turn off all extruders
 +
M140 S0 ;turn off hotbed</nowiki>
 +
 +
== Layer Changes ==
 +
 +
Please also note, that if you want to take advantage of several new features regarding
 +
layer change options, ( I.E. pause at end of layer, take picture, etc)
 +
you will want to add the M790 to the layer change G-Code as well:
 +
 +
<nowiki>
 +
M790 ;announce new layer</nowiki>
  
 
== Everything ==
 
== Everything ==
Line 35: Line 66:
 
MK-1    ABS 1.75mm    .09-.12
 
MK-1    ABS 1.75mm    .09-.12
 
EMO-25  Plasticine    .06</nowiki>
 
EMO-25  Plasticine    .06</nowiki>
 
 
== Layer Changes ==
 
 
Please also note, that if you want to take advantage of several new features regarding
 
layer change options, ( I.E. pause at end of layer, take picture, etc)
 
you will want to add the M790 to the layer change G-Code as well:
 
 
<nowiki>
 
M790 ;announce new layer</nowiki>
 
 
== Start Gcode ==
 
 
This code should be at the beginning of every Gcode file:
 
 
<nowiki>
 
M757 S[nozzle_diameter] ;set layer/path width
 
M729 S3 ;set 16 step mode
 
M758 S0.095 ;set steps/nL
 
M734 F60 ;set error reporting interval for redundant errors to every 60 seconds
 
;--------------------</nowiki>
 
 
== End Gcode ==
 
 
This code should be at the end of every Gcode file:
 
 
<nowiki>
 
;--------------------
 
;M721 ;unprime
 
M103 ;stop extrusion
 
M104 T10 S0 ;turn off all extruders
 
M140 S0 ;turn off hotbed</nowiki>
 

Revision as of 21:24, 10 February 2014

Start Gcode

This code should be at the beginning of every Gcode file:

M757 S[nozzle_diameter] ;set layer/path width
M729 S3 ;set 16 step mode
M758 S0.095 ;set steps/nL
M734 F60 ;set error reporting interval for redundant errors to every 60 seconds
;--------------------

End Gcode

This code should be at the end of every Gcode file:

;--------------------
;M721 ;unprime
M103 ;stop extrusion
M104 T10 S0 ;turn off all extruders
M140 S0 ;turn off hotbed

Layer Changes

Please also note, that if you want to take advantage of several new features regarding layer change options, ( I.E. pause at end of layer, take picture, etc) you will want to add the M790 to the layer change G-Code as well:

M790 ;announce new layer

Everything

Here is code that should be in EVERY recipe:

;now we set up for any build offsets that we may want
G21 ; use millimeters
G90 ; absolute coordinates
G0 Z5 ; lift head to avoid collisions
G28 X0 Y0 ;always home before starting a build home X and Y
G0 X0 Y0 ; move to desired origin, necessary if you want a negative offset
G92 X0 Y0 ; reset origin:to new  X and Y, it is legal to add values to x an y, I.e. X30 Y40 will
;set the current location to X30 an Y40
M83 ; relative extruder coordinates

;set up Head Flow characteristics
M6 T10 ; select all heads on yoke 1
;M227 ; enable unprime/prime on non printing moves
M221 S1.0 ; set fudge factor for extruder to 1.0
M756 S[first_layer_height] ; set first layer thickness
M757 S[nozzle_diameter] ; set layer/path width 
M729 S3  ; set 16 step mode
;set the pulses per unit volume, this is different depending on extruder type
;and material size, I.e if the 1.75mm filament is really 1.65, you can adjust this number 
;Or the Fudge factor M221 to get the correct amount of material.
M758 S0.095   ; set steps/nL

Typical S values for M758:

MK-1     ABS 1.75mm     .09-.12
EMO-25   Plasticine     .06