Jump to content
Ultimaker Community of 3D Printing Experts
  • Sign Up
SlothMcLazy

Python script generated GCODE does not work on Ultimaker 3. Ultimaker does not read GCODE.

Recommended Posts

Posted · Python script generated GCODE does not work on Ultimaker 3. Ultimaker does not read GCODE.

Hello!

 

This is my first post on this forum. Hello everyone!

 

I was given a task at my job. I was told to create some sort of script that would generate "mesh cubes". I wrote code in Python. User inputs printing configurtation parameters (temepratures, nozzle size, first layer size, layer height etc.) and cube dimensions (gap width, gap quantity). It's really hard to explain the inner geometry of the cube so I attached images for reference:

 

768810692_Screenshotfrom2020-06-1611-41-28.thumb.png.74ba62cea818dba48656d1b9b22fdba1.png

 

1891765869_Screenshotfrom2020-06-1611-41-41.thumb.png.3fba6be5553407bea9c28269ca9a211c.png

 

My script generates gcode. When I open GCODE file in Ultimaker Cura it shows printing process. When I try to run GCODE at UltiMaker 3 at my workplace it goes back to main menu, and nothing happens. I've been analyzing GCODE: looking for errors in my file, comparing it to proper Cura generated GCODE and sadly I can't find anything. Surprisingly enough, script generated GCODE works on different 3D printer. I own Creality CR-10S. Of course it doesn't execute some of the commands since my printer is based on Marlin Firmware, nonetheless cube prints on my printer with desired results. Only downsides are that i have to manually autohome all the axis, and manually set bed temeprature since Marlin does not read Ulitmaker's header at the beginning of the gcode. Here's how it worked (sorry for the picture quality, potato phone):

test.thumb.jpg.b42678c64ee7c55a5e204a0bf7eff21a.jpg

I know it's not perfect, I still have quite a few parameters to change, such as extruder speed.

My guess is that it could something wrong with the header and that's why it doesn't work on Ultimaker 3. It's hard to find anything about Ultimaker header. Below you have my script generated GCODE:


output.gcode

 

Sorry for the trouble and thanks in advance!

Share this post


Link to post
Share on other sites
Posted · Python script generated GCODE does not work on Ultimaker 3. Ultimaker does not read GCODE.
12 hours ago, SlothMcLazy said:

comparing it to proper Cura generated GCODE and sadly I can't find anything.

 

look closer... 🙂

 

A file generated by Cura starts like this:

;START_OF_HEADER
;HEADER_VERSION:0.1
;FLAVOR:Griffin
...

compare the second line with yours...

 

 

In addition:

  • Lowercase parameters in Gcode commands will be ignored (in the best case) - check line 34
  • i would use the G0 / G1 convention like described in the Marlin documentation, just to be future proof (https://marlinfw.org/docs/gcode/G000-G001.html)
  • don't forget to ask for the filament diameter for calculations of the extruded volume 🙂
  • besides of the mandatory header the UM3 firmware uses Marlin as well - that means - the rest should already work as intended

 

Good luck!

 

 

 

 

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

×
×
  • Create New...