Is G-code read line by line?











up vote
4
down vote

favorite












I am trying to add the line




G4 P4000 G1 F4000 E-50




to pause and retract the print in order for the printed line to dry (printing in mid air vertically). Does the above code work or should i skip lines or does it not matter at all?




G4 P4000

G1 F4000 E-50




Would the following line do the exact same thing?




G4 P5000 E-50











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




    Basically, only one "Gx" command per line. Everything following is a parameter list modifying the command.
    – Carl Witthoft
    Nov 14 at 16:50






  • 1




    Maybe you should update the question to explain what you exactly want to do, e.g. do you want to change to another filament, e.g. do you pause to retract during the pause? As it stands now the print pauses, you retract the filament after the pause and then the print continues without filament when inserted in between the code lines. Please explain where the pause is taking place.
    – 0scar
    Nov 14 at 20:16








  • 1




    Please edit your question to include the requested information!
    – 0scar
    Nov 16 at 13:20










  • Thank you @0scar i have clarified.
    – Arthur Mamou-Mani
    Nov 16 at 16:22















up vote
4
down vote

favorite












I am trying to add the line




G4 P4000 G1 F4000 E-50




to pause and retract the print in order for the printed line to dry (printing in mid air vertically). Does the above code work or should i skip lines or does it not matter at all?




G4 P4000

G1 F4000 E-50




Would the following line do the exact same thing?




G4 P5000 E-50











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




    Basically, only one "Gx" command per line. Everything following is a parameter list modifying the command.
    – Carl Witthoft
    Nov 14 at 16:50






  • 1




    Maybe you should update the question to explain what you exactly want to do, e.g. do you want to change to another filament, e.g. do you pause to retract during the pause? As it stands now the print pauses, you retract the filament after the pause and then the print continues without filament when inserted in between the code lines. Please explain where the pause is taking place.
    – 0scar
    Nov 14 at 20:16








  • 1




    Please edit your question to include the requested information!
    – 0scar
    Nov 16 at 13:20










  • Thank you @0scar i have clarified.
    – Arthur Mamou-Mani
    Nov 16 at 16:22













up vote
4
down vote

favorite









up vote
4
down vote

favorite











I am trying to add the line




G4 P4000 G1 F4000 E-50




to pause and retract the print in order for the printed line to dry (printing in mid air vertically). Does the above code work or should i skip lines or does it not matter at all?




G4 P4000

G1 F4000 E-50




Would the following line do the exact same thing?




G4 P5000 E-50











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.











I am trying to add the line




G4 P4000 G1 F4000 E-50




to pause and retract the print in order for the printed line to dry (printing in mid air vertically). Does the above code work or should i skip lines or does it not matter at all?




G4 P4000

G1 F4000 E-50




Would the following line do the exact same thing?




G4 P5000 E-50








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 Nov 16 at 16:22





















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 14 at 15:40









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




    Basically, only one "Gx" command per line. Everything following is a parameter list modifying the command.
    – Carl Witthoft
    Nov 14 at 16:50






  • 1




    Maybe you should update the question to explain what you exactly want to do, e.g. do you want to change to another filament, e.g. do you pause to retract during the pause? As it stands now the print pauses, you retract the filament after the pause and then the print continues without filament when inserted in between the code lines. Please explain where the pause is taking place.
    – 0scar
    Nov 14 at 20:16








  • 1




    Please edit your question to include the requested information!
    – 0scar
    Nov 16 at 13:20










  • Thank you @0scar i have clarified.
    – Arthur Mamou-Mani
    Nov 16 at 16:22














  • 1




    Basically, only one "Gx" command per line. Everything following is a parameter list modifying the command.
    – Carl Witthoft
    Nov 14 at 16:50






  • 1




    Maybe you should update the question to explain what you exactly want to do, e.g. do you want to change to another filament, e.g. do you pause to retract during the pause? As it stands now the print pauses, you retract the filament after the pause and then the print continues without filament when inserted in between the code lines. Please explain where the pause is taking place.
    – 0scar
    Nov 14 at 20:16








  • 1




    Please edit your question to include the requested information!
    – 0scar
    Nov 16 at 13:20










  • Thank you @0scar i have clarified.
    – Arthur Mamou-Mani
    Nov 16 at 16:22








1




1




Basically, only one "Gx" command per line. Everything following is a parameter list modifying the command.
– Carl Witthoft
Nov 14 at 16:50




Basically, only one "Gx" command per line. Everything following is a parameter list modifying the command.
– Carl Witthoft
Nov 14 at 16:50




1




1




Maybe you should update the question to explain what you exactly want to do, e.g. do you want to change to another filament, e.g. do you pause to retract during the pause? As it stands now the print pauses, you retract the filament after the pause and then the print continues without filament when inserted in between the code lines. Please explain where the pause is taking place.
– 0scar
Nov 14 at 20:16






Maybe you should update the question to explain what you exactly want to do, e.g. do you want to change to another filament, e.g. do you pause to retract during the pause? As it stands now the print pauses, you retract the filament after the pause and then the print continues without filament when inserted in between the code lines. Please explain where the pause is taking place.
– 0scar
Nov 14 at 20:16






1




1




Please edit your question to include the requested information!
– 0scar
Nov 16 at 13:20




Please edit your question to include the requested information!
– 0scar
Nov 16 at 13:20












Thank you @0scar i have clarified.
– Arthur Mamou-Mani
Nov 16 at 16:22




Thank you @0scar i have clarified.
– Arthur Mamou-Mani
Nov 16 at 16:22










2 Answers
2






active

oldest

votes

















up vote
5
down vote



accepted










Yes, G-code is read line by line. G-code is a numerical control programming language. It basically instructs the machine sequentially line by line to do a specific task. The printer than executes the lines one by one until it reaches the end.



If you instruct the printer to wait (G4 dwell), it will do the wait/dwell first and than will execute the next command to retract the filament. As such, your examples will not work if you want to retract the filament during the pause, you reversed the process if you want to achieve that.



To add a pause (simple) for e.g. filament changing, you should instruct the head to go to a certain position, extract the filament, and now insert the pause/dwell command. Give yourself enough time to insert and prime the nozzle and go back to the last location to continue printing.



You could insert something like (e.g. in between layer change, before G1 Zx.xx):



...
G1 X0 Y0 F2000 ; Relocate the print head
G1 F4000 E-50 ; Retract filament
G4 P40000 ; Wait for 40 seconds
G92 E50 ; The new filament should continue at this value
...
G1 Zx.xx


Depending on what happens after G1 Zx.xx, you may need to set the head back to the location prior to where it was before G1 X0 Y0 F2000.



Do note that there are pausing scripts/plugins available for e.g. Ultimaker Cura, and there is also a filament changing command M600 that can be enabled for certain firmware (if this is your ultimate goal).



Using a post processing plugin of Ultimaker Cura, a pausing script looks like:




...
G0 X137.692 Y105
;TIME_ELAPSED:707.873599
;TYPE:CUSTOM;added code by post processing
;script: PauseAtHeight.py
;current z: 5
;current height: 5.0
M83
G1 F300 Z6
G1 F9000 X190 Y190
G1 F300 Z15
M104 S0; standby temperature
M0;Do the actual pause
M109 S200; resume temperature
G1 F300 Z6
G1 F9000 X133.423 Y105
G1 F9000
M82
G92 E911.50045
;LAYER:24
G0 X137.692 Y105 Z5
...


Note that G0 and G1 are "move to" location instructions (albeit trough a different way, fast move and linear move respectively). If you look closely, you see that after the pause, the printer returns to the X-Y position where it left prior to the pause (X137.692 Y105).





Side note:

Some firmware flavors allow buffering, but each is executed sequentially.






share|improve this answer























  • G0 and G01 are not the same command! G0 means linear interpolation at the rapid rate, and G01 means linear interpolation at the feed rate. the OP would need G01 (at the feed rate).
    – user77232
    Nov 15 at 14:11










  • @user77232 True, G0 is a Fast Move, G1 a Linear Move, in the end they lead to exactly the same end position, this is what I meant, but it has been made clear, thanks.
    – 0scar
    Nov 15 at 19:50


















up vote
4
down vote













This needs to be on two lines like in your second example:




G4 P4000

G1 F4000 E-50




See the RepRap Gcode Wiki for more info. https://reprap.org/wiki/G-code



EDIT: if you actually want to retract and THEN pause, reverse it:




G1 F4000 E-50

G4 P4000







share|improve this answer



















  • 3




    That will not work, G1 is executed after the waiting time, so now it waits, extracts filament and immediately continue, you should do it the other way around.
    – 0scar
    Nov 14 at 16:10






  • 3




    Strictly speaking you are right (wait and retract), but it would be useless if the printer continues afterwards without filament after this procedure. I guess the OP needs to explain what the goal of this sequence is and where it is located in his code.
    – 0scar
    Nov 14 at 20:25






  • 1




    Thanks, edited.
    – Davo
    Nov 15 at 14:37











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%2f7417%2fis-g-code-read-line-by-line%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
5
down vote



accepted










Yes, G-code is read line by line. G-code is a numerical control programming language. It basically instructs the machine sequentially line by line to do a specific task. The printer than executes the lines one by one until it reaches the end.



If you instruct the printer to wait (G4 dwell), it will do the wait/dwell first and than will execute the next command to retract the filament. As such, your examples will not work if you want to retract the filament during the pause, you reversed the process if you want to achieve that.



To add a pause (simple) for e.g. filament changing, you should instruct the head to go to a certain position, extract the filament, and now insert the pause/dwell command. Give yourself enough time to insert and prime the nozzle and go back to the last location to continue printing.



You could insert something like (e.g. in between layer change, before G1 Zx.xx):



...
G1 X0 Y0 F2000 ; Relocate the print head
G1 F4000 E-50 ; Retract filament
G4 P40000 ; Wait for 40 seconds
G92 E50 ; The new filament should continue at this value
...
G1 Zx.xx


Depending on what happens after G1 Zx.xx, you may need to set the head back to the location prior to where it was before G1 X0 Y0 F2000.



Do note that there are pausing scripts/plugins available for e.g. Ultimaker Cura, and there is also a filament changing command M600 that can be enabled for certain firmware (if this is your ultimate goal).



Using a post processing plugin of Ultimaker Cura, a pausing script looks like:




...
G0 X137.692 Y105
;TIME_ELAPSED:707.873599
;TYPE:CUSTOM;added code by post processing
;script: PauseAtHeight.py
;current z: 5
;current height: 5.0
M83
G1 F300 Z6
G1 F9000 X190 Y190
G1 F300 Z15
M104 S0; standby temperature
M0;Do the actual pause
M109 S200; resume temperature
G1 F300 Z6
G1 F9000 X133.423 Y105
G1 F9000
M82
G92 E911.50045
;LAYER:24
G0 X137.692 Y105 Z5
...


Note that G0 and G1 are "move to" location instructions (albeit trough a different way, fast move and linear move respectively). If you look closely, you see that after the pause, the printer returns to the X-Y position where it left prior to the pause (X137.692 Y105).





Side note:

Some firmware flavors allow buffering, but each is executed sequentially.






share|improve this answer























  • G0 and G01 are not the same command! G0 means linear interpolation at the rapid rate, and G01 means linear interpolation at the feed rate. the OP would need G01 (at the feed rate).
    – user77232
    Nov 15 at 14:11










  • @user77232 True, G0 is a Fast Move, G1 a Linear Move, in the end they lead to exactly the same end position, this is what I meant, but it has been made clear, thanks.
    – 0scar
    Nov 15 at 19:50















up vote
5
down vote



accepted










Yes, G-code is read line by line. G-code is a numerical control programming language. It basically instructs the machine sequentially line by line to do a specific task. The printer than executes the lines one by one until it reaches the end.



If you instruct the printer to wait (G4 dwell), it will do the wait/dwell first and than will execute the next command to retract the filament. As such, your examples will not work if you want to retract the filament during the pause, you reversed the process if you want to achieve that.



To add a pause (simple) for e.g. filament changing, you should instruct the head to go to a certain position, extract the filament, and now insert the pause/dwell command. Give yourself enough time to insert and prime the nozzle and go back to the last location to continue printing.



You could insert something like (e.g. in between layer change, before G1 Zx.xx):



...
G1 X0 Y0 F2000 ; Relocate the print head
G1 F4000 E-50 ; Retract filament
G4 P40000 ; Wait for 40 seconds
G92 E50 ; The new filament should continue at this value
...
G1 Zx.xx


Depending on what happens after G1 Zx.xx, you may need to set the head back to the location prior to where it was before G1 X0 Y0 F2000.



Do note that there are pausing scripts/plugins available for e.g. Ultimaker Cura, and there is also a filament changing command M600 that can be enabled for certain firmware (if this is your ultimate goal).



Using a post processing plugin of Ultimaker Cura, a pausing script looks like:




...
G0 X137.692 Y105
;TIME_ELAPSED:707.873599
;TYPE:CUSTOM;added code by post processing
;script: PauseAtHeight.py
;current z: 5
;current height: 5.0
M83
G1 F300 Z6
G1 F9000 X190 Y190
G1 F300 Z15
M104 S0; standby temperature
M0;Do the actual pause
M109 S200; resume temperature
G1 F300 Z6
G1 F9000 X133.423 Y105
G1 F9000
M82
G92 E911.50045
;LAYER:24
G0 X137.692 Y105 Z5
...


Note that G0 and G1 are "move to" location instructions (albeit trough a different way, fast move and linear move respectively). If you look closely, you see that after the pause, the printer returns to the X-Y position where it left prior to the pause (X137.692 Y105).





Side note:

Some firmware flavors allow buffering, but each is executed sequentially.






share|improve this answer























  • G0 and G01 are not the same command! G0 means linear interpolation at the rapid rate, and G01 means linear interpolation at the feed rate. the OP would need G01 (at the feed rate).
    – user77232
    Nov 15 at 14:11










  • @user77232 True, G0 is a Fast Move, G1 a Linear Move, in the end they lead to exactly the same end position, this is what I meant, but it has been made clear, thanks.
    – 0scar
    Nov 15 at 19:50













up vote
5
down vote



accepted







up vote
5
down vote



accepted






Yes, G-code is read line by line. G-code is a numerical control programming language. It basically instructs the machine sequentially line by line to do a specific task. The printer than executes the lines one by one until it reaches the end.



If you instruct the printer to wait (G4 dwell), it will do the wait/dwell first and than will execute the next command to retract the filament. As such, your examples will not work if you want to retract the filament during the pause, you reversed the process if you want to achieve that.



To add a pause (simple) for e.g. filament changing, you should instruct the head to go to a certain position, extract the filament, and now insert the pause/dwell command. Give yourself enough time to insert and prime the nozzle and go back to the last location to continue printing.



You could insert something like (e.g. in between layer change, before G1 Zx.xx):



...
G1 X0 Y0 F2000 ; Relocate the print head
G1 F4000 E-50 ; Retract filament
G4 P40000 ; Wait for 40 seconds
G92 E50 ; The new filament should continue at this value
...
G1 Zx.xx


Depending on what happens after G1 Zx.xx, you may need to set the head back to the location prior to where it was before G1 X0 Y0 F2000.



Do note that there are pausing scripts/plugins available for e.g. Ultimaker Cura, and there is also a filament changing command M600 that can be enabled for certain firmware (if this is your ultimate goal).



Using a post processing plugin of Ultimaker Cura, a pausing script looks like:




...
G0 X137.692 Y105
;TIME_ELAPSED:707.873599
;TYPE:CUSTOM;added code by post processing
;script: PauseAtHeight.py
;current z: 5
;current height: 5.0
M83
G1 F300 Z6
G1 F9000 X190 Y190
G1 F300 Z15
M104 S0; standby temperature
M0;Do the actual pause
M109 S200; resume temperature
G1 F300 Z6
G1 F9000 X133.423 Y105
G1 F9000
M82
G92 E911.50045
;LAYER:24
G0 X137.692 Y105 Z5
...


Note that G0 and G1 are "move to" location instructions (albeit trough a different way, fast move and linear move respectively). If you look closely, you see that after the pause, the printer returns to the X-Y position where it left prior to the pause (X137.692 Y105).





Side note:

Some firmware flavors allow buffering, but each is executed sequentially.






share|improve this answer














Yes, G-code is read line by line. G-code is a numerical control programming language. It basically instructs the machine sequentially line by line to do a specific task. The printer than executes the lines one by one until it reaches the end.



If you instruct the printer to wait (G4 dwell), it will do the wait/dwell first and than will execute the next command to retract the filament. As such, your examples will not work if you want to retract the filament during the pause, you reversed the process if you want to achieve that.



To add a pause (simple) for e.g. filament changing, you should instruct the head to go to a certain position, extract the filament, and now insert the pause/dwell command. Give yourself enough time to insert and prime the nozzle and go back to the last location to continue printing.



You could insert something like (e.g. in between layer change, before G1 Zx.xx):



...
G1 X0 Y0 F2000 ; Relocate the print head
G1 F4000 E-50 ; Retract filament
G4 P40000 ; Wait for 40 seconds
G92 E50 ; The new filament should continue at this value
...
G1 Zx.xx


Depending on what happens after G1 Zx.xx, you may need to set the head back to the location prior to where it was before G1 X0 Y0 F2000.



Do note that there are pausing scripts/plugins available for e.g. Ultimaker Cura, and there is also a filament changing command M600 that can be enabled for certain firmware (if this is your ultimate goal).



Using a post processing plugin of Ultimaker Cura, a pausing script looks like:




...
G0 X137.692 Y105
;TIME_ELAPSED:707.873599
;TYPE:CUSTOM;added code by post processing
;script: PauseAtHeight.py
;current z: 5
;current height: 5.0
M83
G1 F300 Z6
G1 F9000 X190 Y190
G1 F300 Z15
M104 S0; standby temperature
M0;Do the actual pause
M109 S200; resume temperature
G1 F300 Z6
G1 F9000 X133.423 Y105
G1 F9000
M82
G92 E911.50045
;LAYER:24
G0 X137.692 Y105 Z5
...


Note that G0 and G1 are "move to" location instructions (albeit trough a different way, fast move and linear move respectively). If you look closely, you see that after the pause, the printer returns to the X-Y position where it left prior to the pause (X137.692 Y105).





Side note:

Some firmware flavors allow buffering, but each is executed sequentially.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 15 at 19:57

























answered Nov 14 at 16:07









0scar

7,96421139




7,96421139












  • G0 and G01 are not the same command! G0 means linear interpolation at the rapid rate, and G01 means linear interpolation at the feed rate. the OP would need G01 (at the feed rate).
    – user77232
    Nov 15 at 14:11










  • @user77232 True, G0 is a Fast Move, G1 a Linear Move, in the end they lead to exactly the same end position, this is what I meant, but it has been made clear, thanks.
    – 0scar
    Nov 15 at 19:50


















  • G0 and G01 are not the same command! G0 means linear interpolation at the rapid rate, and G01 means linear interpolation at the feed rate. the OP would need G01 (at the feed rate).
    – user77232
    Nov 15 at 14:11










  • @user77232 True, G0 is a Fast Move, G1 a Linear Move, in the end they lead to exactly the same end position, this is what I meant, but it has been made clear, thanks.
    – 0scar
    Nov 15 at 19:50
















G0 and G01 are not the same command! G0 means linear interpolation at the rapid rate, and G01 means linear interpolation at the feed rate. the OP would need G01 (at the feed rate).
– user77232
Nov 15 at 14:11




G0 and G01 are not the same command! G0 means linear interpolation at the rapid rate, and G01 means linear interpolation at the feed rate. the OP would need G01 (at the feed rate).
– user77232
Nov 15 at 14:11












@user77232 True, G0 is a Fast Move, G1 a Linear Move, in the end they lead to exactly the same end position, this is what I meant, but it has been made clear, thanks.
– 0scar
Nov 15 at 19:50




@user77232 True, G0 is a Fast Move, G1 a Linear Move, in the end they lead to exactly the same end position, this is what I meant, but it has been made clear, thanks.
– 0scar
Nov 15 at 19:50










up vote
4
down vote













This needs to be on two lines like in your second example:




G4 P4000

G1 F4000 E-50




See the RepRap Gcode Wiki for more info. https://reprap.org/wiki/G-code



EDIT: if you actually want to retract and THEN pause, reverse it:




G1 F4000 E-50

G4 P4000







share|improve this answer



















  • 3




    That will not work, G1 is executed after the waiting time, so now it waits, extracts filament and immediately continue, you should do it the other way around.
    – 0scar
    Nov 14 at 16:10






  • 3




    Strictly speaking you are right (wait and retract), but it would be useless if the printer continues afterwards without filament after this procedure. I guess the OP needs to explain what the goal of this sequence is and where it is located in his code.
    – 0scar
    Nov 14 at 20:25






  • 1




    Thanks, edited.
    – Davo
    Nov 15 at 14:37















up vote
4
down vote













This needs to be on two lines like in your second example:




G4 P4000

G1 F4000 E-50




See the RepRap Gcode Wiki for more info. https://reprap.org/wiki/G-code



EDIT: if you actually want to retract and THEN pause, reverse it:




G1 F4000 E-50

G4 P4000







share|improve this answer



















  • 3




    That will not work, G1 is executed after the waiting time, so now it waits, extracts filament and immediately continue, you should do it the other way around.
    – 0scar
    Nov 14 at 16:10






  • 3




    Strictly speaking you are right (wait and retract), but it would be useless if the printer continues afterwards without filament after this procedure. I guess the OP needs to explain what the goal of this sequence is and where it is located in his code.
    – 0scar
    Nov 14 at 20:25






  • 1




    Thanks, edited.
    – Davo
    Nov 15 at 14:37













up vote
4
down vote










up vote
4
down vote









This needs to be on two lines like in your second example:




G4 P4000

G1 F4000 E-50




See the RepRap Gcode Wiki for more info. https://reprap.org/wiki/G-code



EDIT: if you actually want to retract and THEN pause, reverse it:




G1 F4000 E-50

G4 P4000







share|improve this answer














This needs to be on two lines like in your second example:




G4 P4000

G1 F4000 E-50




See the RepRap Gcode Wiki for more info. https://reprap.org/wiki/G-code



EDIT: if you actually want to retract and THEN pause, reverse it:




G1 F4000 E-50

G4 P4000








share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 15 at 14:35

























answered Nov 14 at 16:03









Davo

1,4391417




1,4391417








  • 3




    That will not work, G1 is executed after the waiting time, so now it waits, extracts filament and immediately continue, you should do it the other way around.
    – 0scar
    Nov 14 at 16:10






  • 3




    Strictly speaking you are right (wait and retract), but it would be useless if the printer continues afterwards without filament after this procedure. I guess the OP needs to explain what the goal of this sequence is and where it is located in his code.
    – 0scar
    Nov 14 at 20:25






  • 1




    Thanks, edited.
    – Davo
    Nov 15 at 14:37














  • 3




    That will not work, G1 is executed after the waiting time, so now it waits, extracts filament and immediately continue, you should do it the other way around.
    – 0scar
    Nov 14 at 16:10






  • 3




    Strictly speaking you are right (wait and retract), but it would be useless if the printer continues afterwards without filament after this procedure. I guess the OP needs to explain what the goal of this sequence is and where it is located in his code.
    – 0scar
    Nov 14 at 20:25






  • 1




    Thanks, edited.
    – Davo
    Nov 15 at 14:37








3




3




That will not work, G1 is executed after the waiting time, so now it waits, extracts filament and immediately continue, you should do it the other way around.
– 0scar
Nov 14 at 16:10




That will not work, G1 is executed after the waiting time, so now it waits, extracts filament and immediately continue, you should do it the other way around.
– 0scar
Nov 14 at 16:10




3




3




Strictly speaking you are right (wait and retract), but it would be useless if the printer continues afterwards without filament after this procedure. I guess the OP needs to explain what the goal of this sequence is and where it is located in his code.
– 0scar
Nov 14 at 20:25




Strictly speaking you are right (wait and retract), but it would be useless if the printer continues afterwards without filament after this procedure. I guess the OP needs to explain what the goal of this sequence is and where it is located in his code.
– 0scar
Nov 14 at 20:25




1




1




Thanks, edited.
– Davo
Nov 15 at 14:37




Thanks, edited.
– Davo
Nov 15 at 14:37










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%2f7417%2fis-g-code-read-line-by-line%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

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents