Hi thanks,
I found few interesting post as well talking about the start_gcode or prefix, from @DidierKlein and @Das_enginer...
https://ultimaker.com/en/community/view/6190-startgcode-for-um2-not-changing
https://ultimaker.com/en/community/view/7885-kisslicer-1407
I found also the start_gcoce and the end_gcode in the github of the gcode generetor:
https://github.com/ProjectSilkworm/Silkworm/blob/master/GeneratorComponent.cs
//Add Custom Commands at Start string header = Settings["start_gcode"]; //Char[] splitChar = new Char[] {'\\','\n', 'n'}; string[] splitChar = new string[] { "\\n" }; string[] parts = header.Split(splitChar,StringSplitOptions.RemoveEmptyEntries); if (parts != null) { for (int i = 0; i < parts.Length; i++) { sGCode.Add(new GH_String(parts[i])); } } else { sGCode.Add(new GH_String(header)); } if (int.Parse(Settings["absolute_extrudersteps"]) == 1) //if true use absolute distances for extrusion, otherwise use relative { sGCode.Add(new GH_String("M82 ; use absolute distances for extrusion")); } sGCode.Add(new GH_String("G90 ; use absolute coordinates")); sGCode.Add(new GH_String("G21 ; set units to millimeters")); sGCode.Add(new GH_String("G92 E0 ; reset extrusion distance")); //Set Temperature double temp = double.Parse(Settings["temperature"]); sGCode.Add(new GH_String("M104 S" + temp + " ; set temperature")); sGCode.Add(new GH_String("M109 S" + temp + " ; wait for temperature to be reached")); //Extrude a bit of plastic before start sGCode.Add(new GH_String("G1 Z0.0 F360 E1")); #endregion for (int z = 0; z <= sMovements.GetUpperBound(0); z++) { foreach (SilkwormMovement movement in sMovements[z]) { sGCode.AddRange(movement.ToGCode()); } } #region FOOTER sGCode.Add(new GH_String("G92 E0 ; reset extrusion distance")); //Add Custom Commands at End string footer = Settings["end_gcode"]; string[] fparts = footer.Split(splitChar, StringSplitOptions.RemoveEmptyEntries); if (fparts != null) { for (int i = 0; i < fparts.Length; i++) { sGCode.Add(new GH_String(fparts[i])); } } else { sGCode.Add(new GH_String(footer)); } #endregion
the good news is that the Ultimaker 2 can read this gcode, tha bad one is that when i tried to print a test, the nozzle hitted the printind bed... basically the gcode override the machine settings...
What is the problem at this point? the g-code has a wrong z axis i can edit somehow or the g-code has a wrong "effect" on the um2 overriding the setting of the machine....
the example g-code above is this, a wireframe box lenght printing...If i can solve the problem of the nozzle hitting the printing bed i may be able to make a proper print test..
http://projectsilkworm.com/wp-content/uploads/2012/10/wireframe.jpg