Jump to content
Ultimaker Community of 3D Printing Experts
pluggedIN

Proper begining configuration settings for Octoprint

Recommended Posts

I setup OctoPrint today. I have it setup on a Raspberry Pi, and I can get into http://octopi.local without issue. I exported a profile from Cura, and imported into CuraEngine profile page of OctoPrint. I then dragged an STL and wanted OctoPrint to print it. OctoPrint seemed to slice it okay. But normally, the printhead heats up, goes to the near left corner, spews out some filament and then begins the job. It didn't do this. I canceled the job through the OctoPrint. It stopped, but the normal expectation is that it would lower the bed and give time to cool. It didn't do either of those things either.

Basically I just want OctoPrint to replicate what I was doing before with the SD card shuffle. What are the settings that need to be done so that it works in the same way it did before? I just want a good starting point in OctoPrint so I'm not afraid that it is causing harm to my printer.

Share this post


Link to post
Share on other sites

What printer are you using? I think the start codes are slightly different at least for the UM2 vs. UM2+, don't know on the UM

This is what I use for the UM2+

Start:

 

G28 ; home all axesG1 X5 Y10 F3000 ; bring extruder to frontG92 E0 ; zero the extruded lengthG1 Z10 ; lowerG1 E19 F200 ; purge nozzle quicklyG1 E26 F60 ; purge nozzle slowlyG92 E0 ; zero the extruded length againG1 E-5.5 F400 ; retractG1 X190 Z0 F9000 ; pull away filamentG1 X210 F9000 ; wipeG1 Y20 F9000 ; wipeG1 E0 ; feed filament back

 

End:

 

G28 X0 ; home the X-axisM104 S0 ; turn off heatersM140 S0 ; turn off bedM84 ; disable motorsM107 ; Turn off fans 

 

Edited by Guest
Added missing M107 in End code

Share this post


Link to post
Share on other sites

What printer are you using? I think the start codes are slightly different at least for the UM2 vs. UM2+, don't know on the UM

This is what I use for the UM2+

 

I have a UM2+ as well. I assume this goes into the GCODE Scripts section under "Before print job starts" and "After print job completes". Do you have anything in any of the other ones? Why don't you turn off the fans in the end? In "After print job is cancelled", I currently have:

 

; disable motorsM84;disable all heaters{% snippet 'disable_hotends' %}{% snippet 'disable_bed' %};disable fanM106 S0

 

Should that be replaced with what you have in the end section?

Sorry for all the questions, I'm just trying not to fry my machine :D

Share this post


Link to post
Share on other sites

I am not using OctoPrints slicer, I upload already sliced gcode, so the codes are whats used in my slicing software. I would assume if you're slicing in Octoprint, you'd put it there in the start field. Now, if i recall correctly, Octoprint differenciates between Cancelled and Ended. You might have to use the end code in both fields.  I don't remember. I use the End code in my slicer so it is already executed before the print ends, i only added it to the Cancelled field.

Other fields are Connected, Paused and Resumed. Those 3 I left empty, but i never played with Pause & Resume, so you might have to try and see what happens on Pause/Resume.

Turning off the Fans at the end is a good idea. Not sure why i missed that, sorry!

M106 S0 sounds good, however I am using

 

M107 ; Turn off fans 

 

as far as I know M106 S0 should do the same thing (both side fans off, 3rd fan at the back of the hotend remains on till below ~40°C). I don't know what exactly your two snippets are doing, so maybe make sure the heaters are infact off at the end of the print. Should be easy enough to check after maybe a quick test print if its all working as expected.

I don't think you'll fry your printer, i didn't manage to fry mine either and I had a couple of blunders in the process ;-)

Share this post


Link to post
Share on other sites

I use Octoprint, but use Cura 15.04 for slicing, and add the following gcode for the start and end respectively, inside Cura (expert mode, last tab marked Start/End gcode), not Octoprint.

 

;Start gcode;Sliced at: {day} {date} {time};Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density};Print time: {print_time};Filament used: {filament_amount}m {filament_weight}g;Filament cost: {filament_cost};M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line;M109 S{print_temperature} ;Uncomment to add your own temperature lineG21        ;metric valuesG90        ;absolute positioningM82        ;set extruder to absolute modeM107       ;start with the fan offG28 X0 Y0  ;move X/Y to min endstopsG28 Z0     ;move Z to min endstopsG1 F12000 X5 Y10 ;move hotend to front leftG1 Z15.0 F{travel_speed} ;move the platform down 15mmG92 E0                  ;zero the extruded lengthG1 F200 E5              ;extrude 5mm of feed stock FASTG1 F50 E15              ;extrude 15mm of feed stock SLOWG92 E0                  ;zero the extruded length againG1 F{travel_speed};Put printing message on LCD screenM117 Printing...

 

 

;End GCodeM104 S0                     ;extruder heater offM140 S0                     ;heated bed heater off (if you have it)G91                                    ;relative positioningG1 E-1 F300                            ;retract the filament a bit before lifting the nozzle, to release some of the pressureG1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even moreG28 X0 Y0                              ;move X/Y to min endstops, so the head is out of the wayG28 Z0     						 ;move Z to min endstopsM84                         ;steppers offG90                         ;absolute positioning;{profile_string}

 

Share this post


Link to post
Share on other sites

Okay! So we're cooking now....sorta....

I was using Cura 2.1.2 for slicing, but I installed Cura 15.04.6. At first I didn't see the gcode tab, but I went into settings and changed from "Ulticode" to "RepRap (Marlin/Sprinter)". Is that the right gcode setting? I vaguely remember hearing something to that effect before.

So I made that change, generated the gcode from Cura 15.04.6, removed all the gcode stuff from OctoPrint. I drag the gcode file to OctoPrint and it seems to be working!

Here are my questions at this point:

 

  1. Is there any way to do that gcode stuff with the new version of Cura?
  2. Why does M117 never change the LCD? It always says "printing from USB"
  3. Also, it should extrude some filament in the beginning before it starts printing, and it never does. What is a good way to troubleshoot the gcode?

 

Share this post


Link to post
Share on other sites

1) Changing from UltiCode to RepRap is correct when using Octoprint or the like.

How to do this in Cura 2.1. hmm.. Ok, here's what I know, maybe this'll get you started:

The setting in question is is called "machine_gcode_flavor" in 2.1 and can be now found in the base machine profile ultimaker2.json located (on Windows PCs) in  \program files\cura 2.1\resources\machines. The actual profile for the UM2+ is called Ultimaker2plus,json, which inherits this (and other) settings from ultimaker2.json.

Because of all of this inheritance business it is all a bit messy if you ask me.

There's different approaches from there on out, for example you could start creating a new "branch" by copying the related files and adjusting all of them accordingly (don't forget the nozzle profiles also found in this folder)

or probably easier: add an override in ultimaker2plus.json, like this:

 

[...]   "overrides": {       "machine_gcode_flavor": {"default": "RepRap"},       "machine_height": { "default": 203 },       "machine_show_variants": { "default": true },[...]

 

but you will also need to add your start and end code somewhere in there - the default is blank as seen in ultimaker2.json:  

 

[...]"machine_start_gcode" : { "default": "" },   "machine_end_gcode" : { "default": "" },[...]

 

and I don't know what else. Because this is where I threw in the towel and went back to Simplify3D.

2) AFAIK M117 won't work with the original firmware. Or put in other words: I've never managed to make work.

3) What you're looking for is a gcode command G1 Exx Fyyy where xx is the amount to be extruded and yyy the speed it is supposed to be extruded with. Possibly affected by a retraction  (negative xx) earlier in the script or maybe even in the end code carried over from the previous print.

Hope this helps

Edited by Guest

Share this post


Link to post
Share on other sites

danilius and StephanK that you both so much! I think I have OctoPrint mostly doing what it should. I do have a problem with a print, but I don't think it is OctoPrint related, so I'm going to make another post for that.

In the midst of all this, I even upgraded to Tinkergnome. Love the extra info in the front! And you've got me thinking about Simplify3D again. I seem to hear a lot of people like it for slicing... we'll see....

But again, many many thanks!

Share this post


Link to post
Share on other sites

 

  1. Also, it should extrude some filament in the beginning before it starts printing, and it never does. What is a good way to troubleshoot the gcode?

 

 

These lines do the pre-charging of the nozzle, so I'm surprised it's not happening for you:

 

G1 F12000 X5 Y10 ;move hotend to front leftG1 Z15.0 F{travel_speed} ;move the platform down 15mmG92 E0                  ;zero the extruded lengthG1 F200 E5              ;extrude 5mm of feed stock FASTG1 F50 E15              ;extrude 15mm of feed stock SLOWG92 E0                  ;zero the extruded length again

 

Share this post


Link to post
Share on other sites

These lines do the pre-charging of the nozzle, so I'm surprised it's not happening for you:

G1 F12000 X5 Y10 ;move hotend to front left
G1 Z15.0 F{travel_speed} ;move the platform down 15mm
G92 E0                  ;zero the extruded length
G1 F200 E5              ;extrude 5mm of feed stock FAST
G1 F50 E15              ;extrude 15mm of feed stock SLOW
G92 E0                  ;zero the extruded length again

I am hoping you can help...since there is a improved Octoprint plug in in Cura 2.6.2, I am able to see the camera view just fine. However if I just send the print (from Cura) and use the Print with Octoprint, my Ultimaker 2+ doesn't home, purge the nozzle and so on. It immediately wants to print.

That leads me to believe there are things that need to be entered into the Octoprint server. If I go to SETTINGS and GCODE Scripts, there's a few sections in there that I am unsure what to place in there.

Before? After print job completes? After print job is cancelled, etc.

I found a website with Ultimaker 2 settings that are from 2015. At first glance they look ok, but since I have an Ultimaker 2+, I would like someone else to verify :)

Thanks! SOO close to having this work!

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

×

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!