Close



Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: G-Code Commands

  1. #1

    G-Code Commands

    Hi Davo,

    I am trying some custom G-Code for the printer and there are a couple of commands that I was looking into.

    What I want to do is change the bed temperature, the extruder temperature and the feed rate through g-code commands .

    I had tried some things for the extruder but I didn't seem to have any luck till today when I did

    M104 T10 S220
    M109 S220

    Separately it didn't seem to do anything but together I seem to have gotten it working.

    For the Bed,

    Would I insert: M140 S#

    and lastly for the Feed Rate, would I use: M756 S0.18


    Thanks!

  2. #2
    Staff Engineer Davo's Avatar
    Join Date
    Nov 2013
    Location
    Atlanta, GA
    Posts
    1,085
    Follow Davo On Twitter Add Davo on Facebook Add Davo on Google+ Add Davo on Shapeways Add Davo on Thingiverse
    Ryan,

    I have sample gcode commands explained in depth at http://hyrel3d.net/forum/viewforum.php?f=16 - where I can create an account for you if you like. PM me here or email me.

    To summarize:

    1. All commands are sent via gcode.
    2. All variables are persistent unless/until a new value is given; this includes which head(s) you are addressing.
    3. Data loaded from the heads themselves to the Repetrel software are sent to the motion controller FIRST, then the gcode is sent - so gcode settings will overwrite (for the duration of the print) the head settings.

    So:
    M221 S1.1 will change the flow rate multiplier from whatever it was previously (based on path width, layer thickness, length of printing move and print speed - TIMES this multiplier) to 1.1, or a 10% greater flow - ON THE HEAD LAST ADDRESSED with a T variable.

    M221 S1.1 T12 will do the same for the second head only (yoke 1, position 2).

    M221 S1.1 T10 will broadcast this new flow rate multiplier to every head on yoke 1 (the only yoke on current models).

    Also:
    M104 S220 T10 (or M104 T10 S220 - the order of the variables does not matter) will set the temperature for all heads to 220C.

    M109 S220 (set temp to 220 and wait for head to reach 220) will only be applicable to the last head addressed with a T value; I don't recommend waiting for ALL heads (since the prior command in your example used a T10) unless you are, in fact, printing with all four heads, as missing heads will never report that they have reached this temperature. Rather, M109 S220 T12 (or whatever) should be used.

    Please let me know if this did not satisfactorily answer your questions, or if you have others.

  3. #3
    Hi Davo,

    I may have misunderstood upon first read as I tried using M104 S240 T12 and upon reaching the layer I had put that G-code in at, the temperature did not change. Upon second read, I realized that I should use M109 S240 T12 instead, and I will try this next time I print. Will placing this upon a layer change cause the printer to stop though and wait for the temperature to rise to 240 from 235?

    Also, the M221 S1.1 T12 seems to have worked perfectly and I used M140 S0 and M140 S45 to change the bed temperature as well. Thanks for your help so far.

    RD_3D

  4. #4
    Technician
    Join Date
    Sep 2015
    Location
    San Pedro, CA
    Posts
    66
    Quote Originally Posted by Davo View Post
    Ryan,

    I have sample gcode commands explained in depth at http://hyrel3d.net/forum/viewforum.php?f=16 - where I can create an account for you if you like. PM me here or email me.

    To summarize:

    1. All commands are sent via gcode.
    2. All variables are persistent unless/until a new value is given; this includes which head(s) you are addressing.
    3. Data loaded from the heads themselves to the Repetrel software are sent to the motion controller FIRST, then the gcode is sent - so gcode settings will overwrite (for the duration of the print) the head settings.

    So:
    M221 S1.1 will change the flow rate multiplier from whatever it was previously (based on path width, layer thickness, length of printing move and print speed - TIMES this multiplier) to 1.1, or a 10% greater flow - ON THE HEAD LAST ADDRESSED with a T variable.

    M221 S1.1 T12 will do the same for the second head only (yoke 1, position 2).

    M221 S1.1 T10 will broadcast this new flow rate multiplier to every head on yoke 1 (the only yoke on current models).

    Also:
    M104 S220 T10 (or M104 T10 S220 - the order of the variables does not matter) will set the temperature for all heads to 220C.

    M109 S220 (set temp to 220 and wait for head to reach 220) will only be applicable to the last head addressed with a T value; I don't recommend waiting for ALL heads (since the prior command in your example used a T10) unless you are, in fact, printing with all four heads, as missing heads will never report that they have reached this temperature. Rather, M109 S220 T12 (or whatever) should be used.

    Please let me know if this did not satisfactorily answer your questions, or if you have others.
    Thanks for the fantastic resource. Time to study up.

    Mo
    www.LAfilament.com

  5. #5
    Staff Engineer Davo's Avatar
    Join Date
    Nov 2013
    Location
    Atlanta, GA
    Posts
    1,085
    Follow Davo On Twitter Add Davo on Facebook Add Davo on Google+ Add Davo on Shapeways Add Davo on Thingiverse
    Ryan,

    I have tested and can confirm that

    M109 S240 T12 ; await head temp

    on a layer change does indeed cause the printer to await the new head temperature.

    However, the print resumed before repetrel reported the new temperature. Repetrel reports the average of some number of samples, and the printer resumes printing as soon as a single report of the new temperature is received.

    I hope this helps; let me know if you have other questions.

    Davo

    Quote Originally Posted by rd_3d View Post
    Hi Davo,

    I may have misunderstood upon first read as I tried using M104 S240 T12 and upon reaching the layer I had put that G-code in at, the temperature did not change. Upon second read, I realized that I should use M109 S240 T12 instead, and I will try this next time I print. Will placing this upon a layer change cause the printer to stop though and wait for the temperature to rise to 240 from 235?

    Also, the M221 S1.1 T12 seems to have worked perfectly and I used M140 S0 and M140 S45 to change the bed temperature as well. Thanks for your help so far.

    RD_3D

  6. #6
    Staff Engineer Davo's Avatar
    Join Date
    Nov 2013
    Location
    Atlanta, GA
    Posts
    1,085
    Follow Davo On Twitter Add Davo on Facebook Add Davo on Google+ Add Davo on Shapeways Add Davo on Thingiverse
    Mo,

    Thanks very much. I don't know if our gcode applies in all cases to the operation of other printers, so please bear that in mind.

    Davo

    Quote Originally Posted by LAFilament.com View Post
    Thanks for the fantastic resource. Time to study up.

    Mo
    www.LAfilament.com

  7. #7
    Staff Engineer Davo's Avatar
    Join Date
    Nov 2013
    Location
    Atlanta, GA
    Posts
    1,085
    Follow Davo On Twitter Add Davo on Facebook Add Davo on Google+ Add Davo on Shapeways Add Davo on Thingiverse
    I've made a page with flow commands at http://hyrel3d.net/wiki/index.php/Flow_Rate

  8. #8
    Hi Davo,

    That is exactly what I needed, thank you so much for your help! As always, you are the best!!!

    -RD_3D

  9. #9
    Hi Davo,

    I recently adquire a Hyrel 30M printer and I am having some issues with the G-code of my files.

    I changed them to try something and now all the files that I use to print (even the new ones) come with the G-code that I altered without even having one on their one.

    Is there any way to reverse this situation or to reset all the printings that I did so far so that the G-codes can appear as new?

    Thank you

  10. #10
    Quote Originally Posted by Davo View Post
    Ryan,

    I have sample gcode commands explained in depth at
    http://hyrel3d.net/forum/viewforum.php?f=16
    - where I can create an account for you if you like. PM me here or email me.

    To summarize:

    1. All commands are sent via gcode.
    2. All variables are persistent unless/until a new value is given; this includes which head(s) you are addressing.
    3. Data loaded from the heads themselves to the Repetrel software are sent to the motion controller FIRST, then the gcode is sent - so gcode settings will overwrite (for the duration of the print) the head settings.

    So:
    M221 S1.1 will change the flow rate multiplier from whatever it was previously (based on path width, layer thickness, length of printing move and print speed - TIMES this multiplier) to 1.1, or a 10% greater flow - ON THE HEAD LAST ADDRESSED with a T variable.

    M221 S1.1 T12 will do the same for the second head only (yoke 1, position 2).

    M221 S1.1 T10 will broadcast this new flow rate multiplier to every head on yoke 1 (the only yoke on current models).

    Also:
    M104 S220 T10 (or M104 T10 S220 - the order of the variables does not matter) will set the temperature for all heads to 220C.

    M109 S220 (set temp to 220 and wait for head to reach 220) will only be applicable to the last head addressed with a T value; I don't recommend waiting for ALL heads (since the prior command in your example used a T10) unless you are, in fact, printing with all four heads, as missing heads will never report that they have reached this temperature. Rather, M109 S220 T12 (or whatever) should be used.

    Please let me know if this did not satisfactorily answer your questions, or if you have others.
    Thanks for this

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •