execution order of blocks for 3d printer?
September 30, 2013 02:12PM

Trying to write a small application to execute blocks in a .gcode file.

Is there any "accepted standard" of execution order?

Found the below example for a specific cnc controller type.

regards Knut


1. Comment
1.1 Comment message
2. Set feed rate mode (G93, G94, G95).
3. Set feed rate (F).
4. Set spindle speed (S).
5. Select tool (T).
6. Change tool (M6).
7. Spindle on or off (M3, M4, M5).
8. Coolant on or off (M7, M8, M9).
9. Enable or disable overrides (M48, M49).
10. Dwell (G4).
11. Set active plane (G17, G18, G19).
12. Set length units (G20, G21).
13. Cutter radius compensation on or off (G40, G41, G42)
14. Cutter length compensation on or off (G43, G44, G49)
14.5 Do scaling G50/G51.
15. Coordinate system selection (G54, G55, G56, G57, G58, G59, G59.1, G59.2, G59.3).
16. Set path control mode (G61, G61.1, G64)
17. Set distance mode (G90, G91).
18. Set retract mode (G98, G99).
18.6 Do G68/69 coordinate rotation. Scaling before rotation.
18.7 Do G15/16 polar coordinates.
19. Go to reference location (G28, G30) or change coordinate system data (G10) or set axis offsets
(G92, G92.1, G92.2, G94).

20. Perform motion (G0 to G3, G33, G34, G38.x, G73, G76, G80 to G89), as modified (possibly) by G53.

21. Stop (M0, M1, M2, M30, M60).
22. M97, M98, M99

Edited 1 time(s). Last edit at 09/30/2013 02:31PM by knut.
Re: execution order of blocks for 3d printer?
October 01, 2013 02:17PM
Exchause me, but I wonder if my question was unclear/not proper or asking for secret informations here.

Just trying to find out why no one pay attention to answer smiling smiley

Thank You

regards Knut
Re: execution order of blocks for 3d printer?
October 01, 2013 04:54PM
Frankly I was struggling trying to understand what you were asking for. Also, it seem to me that this question is not related to slic3r, and would probably be better posted in one of the more general forums.
Re: execution order of blocks for 3d printer?
October 02, 2013 02:07AM
Yes there is an execution order.
The same with CNC milling.
First line read is the instruction, then the second. Each line has different parameters for that particular instruction, so all parameters are taken into account at the same time.
G0 X2.00 Y0.00 Z6.00 F2300

You'll go to X = 2; Y= 0; Z=6 at the speed 2300m/min (or what ever unit) at the same time.

It isn't math where you have to think is 6*2/2^5+2*2 equal to (6*2/2^5)+(2*2) or (6*2/2^5+2)*2

Does it help? Or am I not understanding the question?
Re: execution order of blocks for 3d printer?
October 04, 2013 07:30AM
hello and thank You for answer.
Yes it was something like that.

My questing is about the execution order of parameters.

Just wondered if there exists an "agreement" amongs the developers of slicing applications, in howto write out parameters on each line?

ie: could this line : G0 X2.00 Y0.00 Z6.00 F2300 be written (in gcode file)
as F2300 G0........

I also wonder if the arguments of the parameters are valid until new arguments are input? (like in cnc, if I understood it right).
(ie. x=2.00 UNTIL a new argument of X is input?

thank You.

Re: execution order of blocks for 3d printer?
October 09, 2013 03:31PM
You have seen: [reprap.org] or [carlsonmfg.com]
Sorry, only registered users may post in this forum.

Click here to login