G4 S20 vs. G4 P2000











up vote
2
down vote

favorite












Given the Marlin Firmware what is the difference between the following lines of code:




G4 S20




and




G4 P2000











share|improve this question









New contributor




Arthur Mamou-Mani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    You really ought to be able to look up gcode reference tables online!
    – Carl Witthoft
    Nov 16 at 13:11






  • 1




    Please edit your question to include the firmware you are using so that people can answer the question for your specific case.
    – 0scar
    Nov 16 at 13:11










  • @0scar done :) thank you
    – Arthur Mamou-Mani
    2 days ago










  • @CarlWitthoft of course I did prior to asking.
    – Arthur Mamou-Mani
    2 days ago















up vote
2
down vote

favorite












Given the Marlin Firmware what is the difference between the following lines of code:




G4 S20




and




G4 P2000











share|improve this question









New contributor




Arthur Mamou-Mani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    You really ought to be able to look up gcode reference tables online!
    – Carl Witthoft
    Nov 16 at 13:11






  • 1




    Please edit your question to include the firmware you are using so that people can answer the question for your specific case.
    – 0scar
    Nov 16 at 13:11










  • @0scar done :) thank you
    – Arthur Mamou-Mani
    2 days ago










  • @CarlWitthoft of course I did prior to asking.
    – Arthur Mamou-Mani
    2 days ago













up vote
2
down vote

favorite









up vote
2
down vote

favorite











Given the Marlin Firmware what is the difference between the following lines of code:




G4 S20




and




G4 P2000











share|improve this question









New contributor




Arthur Mamou-Mani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Given the Marlin Firmware what is the difference between the following lines of code:




G4 S20




and




G4 P2000








g-code






share|improve this question









New contributor




Arthur Mamou-Mani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Arthur Mamou-Mani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago





















New contributor




Arthur Mamou-Mani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 16 at 10:26









Arthur Mamou-Mani

1455




1455




New contributor




Arthur Mamou-Mani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Arthur Mamou-Mani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Arthur Mamou-Mani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    You really ought to be able to look up gcode reference tables online!
    – Carl Witthoft
    Nov 16 at 13:11






  • 1




    Please edit your question to include the firmware you are using so that people can answer the question for your specific case.
    – 0scar
    Nov 16 at 13:11










  • @0scar done :) thank you
    – Arthur Mamou-Mani
    2 days ago










  • @CarlWitthoft of course I did prior to asking.
    – Arthur Mamou-Mani
    2 days ago














  • 1




    You really ought to be able to look up gcode reference tables online!
    – Carl Witthoft
    Nov 16 at 13:11






  • 1




    Please edit your question to include the firmware you are using so that people can answer the question for your specific case.
    – 0scar
    Nov 16 at 13:11










  • @0scar done :) thank you
    – Arthur Mamou-Mani
    2 days ago










  • @CarlWitthoft of course I did prior to asking.
    – Arthur Mamou-Mani
    2 days ago








1




1




You really ought to be able to look up gcode reference tables online!
– Carl Witthoft
Nov 16 at 13:11




You really ought to be able to look up gcode reference tables online!
– Carl Witthoft
Nov 16 at 13:11




1




1




Please edit your question to include the firmware you are using so that people can answer the question for your specific case.
– 0scar
Nov 16 at 13:11




Please edit your question to include the firmware you are using so that people can answer the question for your specific case.
– 0scar
Nov 16 at 13:11












@0scar done :) thank you
– Arthur Mamou-Mani
2 days ago




@0scar done :) thank you
– Arthur Mamou-Mani
2 days ago












@CarlWitthoft of course I did prior to asking.
– Arthur Mamou-Mani
2 days ago




@CarlWitthoft of course I did prior to asking.
– Arthur Mamou-Mani
2 days ago










2 Answers
2






active

oldest

votes

















up vote
6
down vote



accepted










The answer is that it depends on the type of firmware you are using.



Let us look at the documentation of G4 to find that G4 is valid for all the listed firmware types:
enter image description here




Pause the machine for a period of time.




Furthermore it states that:




Parameters




  • Pnnn Time to wait, in milliseconds (In Teacup, P0, wait until all previous moves are finished)

  • Snnn Time to wait, in seconds (Only on Repetier, Marlin, Smoothieware, and RepRapFirmware 1.16 and later)




It clearly shows that the S parameter (which defines the pause in seconds) is only supported by a few firmware types. Do note that this documentation may not be up-to-date, so it is best to look into the source code or the users manual of the particular firmware you are using.





E.g. if you are using Marlin Firmware, G4 S20 will pause the machine for 20 seconds while G4 P2000 will pause the machine for 2000 milliseconds which is 2 seconds. This means that a different time is requested, to have 20 seconds waiting time you could use G4 P20000



To answer your question what the actual difference between the 2 commands is:




  • it is either 18 seconds of extra waiting time if your firmware supports the S parameter, or

  • a firmware that skips or chokes on the command because it is not supported (that also probably depends on your firmware).






share|improve this answer






























    up vote
    1
    down vote













    The code G4 refers to dwell. (From what I'm seeing, it can be written as either G4 or G04). Pis the length of dwell time, usually in milliseconds. The parameter S seems to be invalid, because the only inputs are X (seconds), P (milliseconds), or U (undefined). If you have S20 in your code, it is invalid, whereas P2000 will cause all axes to remain unmoving for 2 seconds before moving on.



    (Note: Not all machines will accept X or U.)



    EDIT: This answer is specific to non-specific g-code, taken from this Source, since the OP did not state any specifics about their firmware type or equipment used.






    share|improve this answer























    • See Oscar's answer -- yours is applicable only to certain firmwares.
      – Carl Witthoft
      Nov 16 at 13:12










    • I'm curious to know for which firmware(s) this is, could you please add that to your answer.
      – 0scar
      Nov 16 at 16:02











    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "640"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Arthur Mamou-Mani is a new contributor. Be nice, and check out our Code of Conduct.










     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2f3dprinting.stackexchange.com%2fquestions%2f7432%2fg4-s20-vs-g4-p2000%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    6
    down vote



    accepted










    The answer is that it depends on the type of firmware you are using.



    Let us look at the documentation of G4 to find that G4 is valid for all the listed firmware types:
    enter image description here




    Pause the machine for a period of time.




    Furthermore it states that:




    Parameters




    • Pnnn Time to wait, in milliseconds (In Teacup, P0, wait until all previous moves are finished)

    • Snnn Time to wait, in seconds (Only on Repetier, Marlin, Smoothieware, and RepRapFirmware 1.16 and later)




    It clearly shows that the S parameter (which defines the pause in seconds) is only supported by a few firmware types. Do note that this documentation may not be up-to-date, so it is best to look into the source code or the users manual of the particular firmware you are using.





    E.g. if you are using Marlin Firmware, G4 S20 will pause the machine for 20 seconds while G4 P2000 will pause the machine for 2000 milliseconds which is 2 seconds. This means that a different time is requested, to have 20 seconds waiting time you could use G4 P20000



    To answer your question what the actual difference between the 2 commands is:




    • it is either 18 seconds of extra waiting time if your firmware supports the S parameter, or

    • a firmware that skips or chokes on the command because it is not supported (that also probably depends on your firmware).






    share|improve this answer



























      up vote
      6
      down vote



      accepted










      The answer is that it depends on the type of firmware you are using.



      Let us look at the documentation of G4 to find that G4 is valid for all the listed firmware types:
      enter image description here




      Pause the machine for a period of time.




      Furthermore it states that:




      Parameters




      • Pnnn Time to wait, in milliseconds (In Teacup, P0, wait until all previous moves are finished)

      • Snnn Time to wait, in seconds (Only on Repetier, Marlin, Smoothieware, and RepRapFirmware 1.16 and later)




      It clearly shows that the S parameter (which defines the pause in seconds) is only supported by a few firmware types. Do note that this documentation may not be up-to-date, so it is best to look into the source code or the users manual of the particular firmware you are using.





      E.g. if you are using Marlin Firmware, G4 S20 will pause the machine for 20 seconds while G4 P2000 will pause the machine for 2000 milliseconds which is 2 seconds. This means that a different time is requested, to have 20 seconds waiting time you could use G4 P20000



      To answer your question what the actual difference between the 2 commands is:




      • it is either 18 seconds of extra waiting time if your firmware supports the S parameter, or

      • a firmware that skips or chokes on the command because it is not supported (that also probably depends on your firmware).






      share|improve this answer

























        up vote
        6
        down vote



        accepted







        up vote
        6
        down vote



        accepted






        The answer is that it depends on the type of firmware you are using.



        Let us look at the documentation of G4 to find that G4 is valid for all the listed firmware types:
        enter image description here




        Pause the machine for a period of time.




        Furthermore it states that:




        Parameters




        • Pnnn Time to wait, in milliseconds (In Teacup, P0, wait until all previous moves are finished)

        • Snnn Time to wait, in seconds (Only on Repetier, Marlin, Smoothieware, and RepRapFirmware 1.16 and later)




        It clearly shows that the S parameter (which defines the pause in seconds) is only supported by a few firmware types. Do note that this documentation may not be up-to-date, so it is best to look into the source code or the users manual of the particular firmware you are using.





        E.g. if you are using Marlin Firmware, G4 S20 will pause the machine for 20 seconds while G4 P2000 will pause the machine for 2000 milliseconds which is 2 seconds. This means that a different time is requested, to have 20 seconds waiting time you could use G4 P20000



        To answer your question what the actual difference between the 2 commands is:




        • it is either 18 seconds of extra waiting time if your firmware supports the S parameter, or

        • a firmware that skips or chokes on the command because it is not supported (that also probably depends on your firmware).






        share|improve this answer














        The answer is that it depends on the type of firmware you are using.



        Let us look at the documentation of G4 to find that G4 is valid for all the listed firmware types:
        enter image description here




        Pause the machine for a period of time.




        Furthermore it states that:




        Parameters




        • Pnnn Time to wait, in milliseconds (In Teacup, P0, wait until all previous moves are finished)

        • Snnn Time to wait, in seconds (Only on Repetier, Marlin, Smoothieware, and RepRapFirmware 1.16 and later)




        It clearly shows that the S parameter (which defines the pause in seconds) is only supported by a few firmware types. Do note that this documentation may not be up-to-date, so it is best to look into the source code or the users manual of the particular firmware you are using.





        E.g. if you are using Marlin Firmware, G4 S20 will pause the machine for 20 seconds while G4 P2000 will pause the machine for 2000 milliseconds which is 2 seconds. This means that a different time is requested, to have 20 seconds waiting time you could use G4 P20000



        To answer your question what the actual difference between the 2 commands is:




        • it is either 18 seconds of extra waiting time if your firmware supports the S parameter, or

        • a firmware that skips or chokes on the command because it is not supported (that also probably depends on your firmware).







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 16 at 14:35

























        answered Nov 16 at 13:09









        0scar

        7,93421139




        7,93421139






















            up vote
            1
            down vote













            The code G4 refers to dwell. (From what I'm seeing, it can be written as either G4 or G04). Pis the length of dwell time, usually in milliseconds. The parameter S seems to be invalid, because the only inputs are X (seconds), P (milliseconds), or U (undefined). If you have S20 in your code, it is invalid, whereas P2000 will cause all axes to remain unmoving for 2 seconds before moving on.



            (Note: Not all machines will accept X or U.)



            EDIT: This answer is specific to non-specific g-code, taken from this Source, since the OP did not state any specifics about their firmware type or equipment used.






            share|improve this answer























            • See Oscar's answer -- yours is applicable only to certain firmwares.
              – Carl Witthoft
              Nov 16 at 13:12










            • I'm curious to know for which firmware(s) this is, could you please add that to your answer.
              – 0scar
              Nov 16 at 16:02















            up vote
            1
            down vote













            The code G4 refers to dwell. (From what I'm seeing, it can be written as either G4 or G04). Pis the length of dwell time, usually in milliseconds. The parameter S seems to be invalid, because the only inputs are X (seconds), P (milliseconds), or U (undefined). If you have S20 in your code, it is invalid, whereas P2000 will cause all axes to remain unmoving for 2 seconds before moving on.



            (Note: Not all machines will accept X or U.)



            EDIT: This answer is specific to non-specific g-code, taken from this Source, since the OP did not state any specifics about their firmware type or equipment used.






            share|improve this answer























            • See Oscar's answer -- yours is applicable only to certain firmwares.
              – Carl Witthoft
              Nov 16 at 13:12










            • I'm curious to know for which firmware(s) this is, could you please add that to your answer.
              – 0scar
              Nov 16 at 16:02













            up vote
            1
            down vote










            up vote
            1
            down vote









            The code G4 refers to dwell. (From what I'm seeing, it can be written as either G4 or G04). Pis the length of dwell time, usually in milliseconds. The parameter S seems to be invalid, because the only inputs are X (seconds), P (milliseconds), or U (undefined). If you have S20 in your code, it is invalid, whereas P2000 will cause all axes to remain unmoving for 2 seconds before moving on.



            (Note: Not all machines will accept X or U.)



            EDIT: This answer is specific to non-specific g-code, taken from this Source, since the OP did not state any specifics about their firmware type or equipment used.






            share|improve this answer














            The code G4 refers to dwell. (From what I'm seeing, it can be written as either G4 or G04). Pis the length of dwell time, usually in milliseconds. The parameter S seems to be invalid, because the only inputs are X (seconds), P (milliseconds), or U (undefined). If you have S20 in your code, it is invalid, whereas P2000 will cause all axes to remain unmoving for 2 seconds before moving on.



            (Note: Not all machines will accept X or U.)



            EDIT: This answer is specific to non-specific g-code, taken from this Source, since the OP did not state any specifics about their firmware type or equipment used.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 16 at 16:19

























            answered Nov 16 at 10:54









            Pᴀᴜʟsᴛᴇʀ2

            7442222




            7442222












            • See Oscar's answer -- yours is applicable only to certain firmwares.
              – Carl Witthoft
              Nov 16 at 13:12










            • I'm curious to know for which firmware(s) this is, could you please add that to your answer.
              – 0scar
              Nov 16 at 16:02


















            • See Oscar's answer -- yours is applicable only to certain firmwares.
              – Carl Witthoft
              Nov 16 at 13:12










            • I'm curious to know for which firmware(s) this is, could you please add that to your answer.
              – 0scar
              Nov 16 at 16:02
















            See Oscar's answer -- yours is applicable only to certain firmwares.
            – Carl Witthoft
            Nov 16 at 13:12




            See Oscar's answer -- yours is applicable only to certain firmwares.
            – Carl Witthoft
            Nov 16 at 13:12












            I'm curious to know for which firmware(s) this is, could you please add that to your answer.
            – 0scar
            Nov 16 at 16:02




            I'm curious to know for which firmware(s) this is, could you please add that to your answer.
            – 0scar
            Nov 16 at 16:02










            Arthur Mamou-Mani is a new contributor. Be nice, and check out our Code of Conduct.










             

            draft saved


            draft discarded


















            Arthur Mamou-Mani is a new contributor. Be nice, and check out our Code of Conduct.













            Arthur Mamou-Mani is a new contributor. Be nice, and check out our Code of Conduct.












            Arthur Mamou-Mani is a new contributor. Be nice, and check out our Code of Conduct.















             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2f3dprinting.stackexchange.com%2fquestions%2f7432%2fg4-s20-vs-g4-p2000%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Ellipse (mathématiques)

            Quarter-circle Tiles

            Mont Emei