Jump to content

Tool change G Code Garbled

Recommended Posts

Posted · Tool change G Code Garbled

I'm trying to implement a section of G-code during a tool change, shown below:

; Start Extruder 1
M211 S0 ; Turn off soft stops
G1 X-9.5 F6000 ; Go to X=-9.5 at 100 mm/sec
G92 E0 ; Reset extrusion distance on new tool
G1 E50 F90 ; Extrude 50 mm of filament at 1.5 mm/s on new tool
M211 S1
G92 E0 ; Set current extruder position to 0mm
G0 F10000 ; Increase feed rate before next travel.



; End Extruder 1
G92 E0 ; Reset extrusion distance
G1 E-5 F5000; Retract 5 mm
G91 ; Switch from absolute positioning to relative positioning
G1 Z1 F1000 ; Lift nozzle by 1 mm in relative positioning mode
G90 ; Return to absolute positioning
G92 E0 ; Reset extrusion distance on old tool


I do this for each of my two extruders under the machine settings for my printer.


The issue is that when I slice a file, save the G Code, and then view the G Code in Notepad++, one/both of the sections of custom G Code are unreadable. They show up as non-characters, and the printer doesn't execute them. If I copy/paste the text in my snippet above, it never makes it to my G Code. Any idea?





Share this post

Link to post
Share on other sites
Posted · Tool change G Code Garbled

For example, the extruder start g-code above ends up as ��� (or however your text editor shows unreadable characters).


It isn't constant. The same start g-code will work perfectly for another file, or it'll only be garbled for the first 10,000 lines of the g-code file, etc. and appear normally after that.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • January 22nd  | Ultimaker webinar 'Learn how to choose the right composite material'
      We’ll teach you how to choose the right composite material for your application in our new 40-minute webinar. You will learn how to: 
      • Make the perfect choice between glass and carbon fiber 
      • Identify more high-value applications that would benefit from composites 
      • 3D print advanced materials with the right settings 
      • Select the best materials for 3D printing end-use parts 
      • Use dual extrusion to take composite 3D printing to the next level 
      • 0 replies
    • Does your company use Ultimaker? Know one that does? Let us know!
      If your company uses Ultimaker in any capacity, we'd love to hear about it! If the story is there, and you're up for it, maybe we can work together to create a story that will be featured on the site. Here are examples of..
      • 18 replies
  • Create New...

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!