Avisos
Vaciar todo

script to drop temperature during ramming  

Página 3 / 5
  RSS
Peter L
(@peter-l)
Honorable Member
Re: script to drop temperature during ramming


* I said it before and I will say it again. Controlling ramming temp is key to getting many different filaments working with MMU2 *

I totally agree. I opened a feature request on GitHub for this: https://github.com/prusa3d/Slic3r/issues/1300 .

If you want to lobby for this, maybe jump in and add a comment about how this matters.

Respondido : 22/10/2018 4:14 pm
Paul Meyer
(@paul-meyer)
Honorable Member
Topic starter answered:
Re: script to drop temperature during ramming

I've updated the script. Pushed to github.

Changes:
if Slic3r inserts a temp change during the purge block, delete it by default. Generally want to move the temp change closer to the actual tool change. This can be overridden with the --temp_change_override switch, in which case the temp change is left in.

Split the temperature control options:

Before Ramming:
by default the temperature stabilizes at the selected temperature (slow) before ramming. The '-nwr' (no_wait_ram) option uses m104 instead of m109, basically turning off the nozzle (if you use the default 180 temp) and immediately ram, no waiting.

After Ramming:
By default: use m104 to reset the correct temp before the tool change, then stabilize with m109 just after the tool change. If the -nwt option is used, there is an m104 (set temp, no wait) before the tool change, and no m109 after the tool change, just start purging while the nozzle stabilizes. If the -fs (full_stabilization_tc) option is selected, an m109 is used before the tool change and the temperature will completely stabilize at the new temp before the new filament is loaded. (I would go with -nwt typically, but if you have a very high temp filament you might not want to load it until the nozzle is heated, so -fs might be better).

From the cool_ram.py -h

usage: cool_ram.py [-h] [-t RAM_TEMP] [-nwr] [-nwt] [-fs]
[--temp_change_override] -i INPUT [-o OUTPUT]

Simple script to hack the gcode from Prusa Slic3r v1.41.0 to drop temp during ram

optional arguments:
-h, --help show this help message and exit
-t RAM_TEMP, --ram_temp RAM_TEMP
Ram temperature
-nwr, --no_wait_ram don't wait for stable temp when starting the ram
sequence
-nwt, --no_wait_tc don't wait for stable temp before printing with the
new filament (after the tool change)
-fs, --full_stabilization_tc
wait for full stable temperature before initiating the
tool change
--temp_change_override
Retain the Slic3r inserted temperature after ramming
and before tool change (default false)
-i INPUT, --input INPUT
input file
-o OUTPUT, --output OUTPUT
output file

Example usage:
-----------
Example #1: Cool to 195 for ramming. Stabilize at 195 before ram,
stabilize at print temp just after tool change

#$ cool_ram.py -t 195 -i input.gcode -o output.gcode

-----------
Example #2: Set temp to 180 (default temp) for ram, but don't wait
for it to stabilize. This basically just cuts power to the nozzle
and immediately starts ramming. After the tool change, it restores
temperature to the print temp, but doesn't wait for it to stabilize.

#$ cool_ram.py -nwr -nwt -i input.gcode -o output.gcode

-----------
Example #3: Same as previous, but allow the temp to stabilize
just after the tool change before printing with the new filament.
Might be a good idea if nozzle isn't getting hot quickly enough.

#$ cool_ram.py -nwr -i input.gcode -o output.gcode

Respondido : 22/10/2018 9:17 pm
CLKandCJK
(@clkandcjk)
Eminent Member
Re: script to drop temperature during ramming

Awesome! I will give it a go tonight and let you know what happens.

Respondido : 23/10/2018 1:24 am
nuroo
(@nuroo)
Reputable Member
Re: script to drop temperature during ramming

@Paul

Its been a few weeks since I used your script. But I just printed gcode from kisslicer which lowers filament temps before ramming like your script, and I didnt have any layer skips. So now I want to revisit your script.

Are these assumptions correct??

Slice gcode with optimal print temps, basically use default mmu2 filament profile?
Then post process with your script?
Thank you for giving example use cases.

Which is preferred script usage/syntax?
Which is the conservative maybe takes more time but always works syntax?
Fastest quick and dirty syntax?
What is the syntax you use or why?

Should we PID tune b4, if so do we tune for filament print temp or ram temp, a temp in between the two? I'm using standard 40W stock heater..

Prusa MK3 preassembled (R2/B6) > (R3/B/7)
Prusa MK2.5 kit > MK3 > MK3+MMU2 (R3/B/7) 😀
Prusa SL1 3D printer + Curing and Washing Machine (day1 order)
Taz6
CR10s4
Delta 3ku

Respondido : 23/10/2018 2:53 am
Paul Meyer
(@paul-meyer)
Honorable Member
Topic starter answered:
Re: script to drop temperature during ramming



Slice gcode with optimal print temps, basically use default mmu2 filament profile?
Then post process with your script?
Thank you for giving example use cases.

Which is preferred script usage/syntax?
Which is the conservative maybe takes more time but always works syntax?
Fastest quick and dirty syntax?
What is the syntax you use or why?

Should we PID tune b4, if so do we tune for filament print temp or ram temp, a temp in between the two? I'm using standard 40W stock heater..

There is no science to this, so take everything with a grain of salt. It will help to understand a bit what is going on in the gcode, and running my script and comparing input/output (an editor that can show differences between two files will help).

What I would recommend is to try two things:

First, for the filaments you are using, do some test prints to figure out the lower end of the temperature range you can use for successful prints. For my Inland PLA, this was about 205C. Create an MMU2 filament profile for your filament with those temps, and either default load/unload/ram settings, or play with those settings following other advice here to get pretty good tips.

Once you get close, you can see if lowering the temperature of the tip before unloading helps. You have two basic options:

Just drop the temp a bit during ramming:

cool_ram.py -t 195 -i input.gcode -o output.gcode

This is what I started out with. It stabilizes the temperature at 195 (or whatever you specify), does the ram sequence, and then raises the temperature back to the original temperature during the unload/load sequence, stabilizing the temp before printing the new filament. Give it a try on a test print and stick your filament tips out to see if they look better.

--------
The second variation I added after reading about what KISS slicer does: just turn off the nozzle heater during ram. I emulate this by setting the temperature quite low (typically 180) and not waiting for it to stabilize, just start ramming. I typically increase the ram time to 3.5 or 4 seconds on this one. Then it sets the temp back just before the unload/load sequence, and it (typically) has time to stabilize during the purge.

cool_ram.py -t 180 -nwr -nwt -i input.gcode -o output.gcode

-t => specify the temperature
-nwr => don't wait to stabilize before starting ram
-nwt => don't wait to stabilize when setting the temperature back at the tool change

I'd give those a try and see how it goes. The big thing is to actually look at the gcode to understand what is going on, and watch the temperatures during the purge tower sequence to see if it is doing ok or you need to tweak things.

One thing to watch out for: if you drop the temp too far, you can 'freeze' it in the nozzle and when you try to unload it'll jam. I only had that issue once when I was pushing things too far.

---
Note: this only works with Slic3r gcode, as it depends on the specific comments slic3r puts in.

I did my PID tuning for normal operation, definitely. I'm much more interested in stable temperature during the print, and I'm specifically going for pretty wild swings over the purge tower, so no need to PID tune for the extreme cases.

Good luck.

Respondido : 23/10/2018 3:50 am
nuroo
(@nuroo)
Reputable Member
Re: script to drop temperature during ramming

lastest cool_ram
D:\Downloads\test git>cool_ram.py -t 190 -i Racing_frogs.gcode -o Racing_frogs_coolrammed.gcode
Traceback (most recent call last):
File "D:\Downloads\test git\cool_ram.py", line 71, in <module>
infile = open(inpath, 'r', encoding="utf8")
TypeError: 'encoding' is an invalid keyword argument for this function

Prusa MK3 preassembled (R2/B6) > (R3/B/7)
Prusa MK2.5 kit > MK3 > MK3+MMU2 (R3/B/7) 😀
Prusa SL1 3D printer + Curing and Washing Machine (day1 order)
Taz6
CR10s4
Delta 3ku

Respondido : 23/10/2018 4:26 am
CLKandCJK
(@clkandcjk)
Eminent Member
Re: script to drop temperature during ramming

FYI, I posted a feature request on GitHub. I figured that would be the most appropriate place

https://github.com/3Dabbler/mmu2_ram_cool/issues/1

Respondido : 23/10/2018 2:37 pm
Paul Meyer
(@paul-meyer)
Honorable Member
Topic starter answered:
Re: script to drop temperature during ramming


FYI, I posted a feature request on GitHub. I figured that would be the most appropriate place

https://github.com/3Dabbler/mmu2_ram_cool/issues/1

Cool! Never had feature requests through github before. I just use it for distribution. Now I feel like a real developer.

I'll have a look.

Paul

Respondido : 23/10/2018 3:14 pm
Paul Meyer
(@paul-meyer)
Honorable Member
Topic starter answered:
Re: script to drop temperature during ramming


lastest cool_ram
D:\Downloads\test git>cool_ram.py -t 190 -i Racing_frogs.gcode -o Racing_frogs_coolrammed.gcode
Traceback (most recent call last):
File "D:\Downloads\test git\cool_ram.py", line 71, in <module>
infile = open(inpath, 'r', encoding="utf8")
TypeError: 'encoding' is an invalid keyword argument for this function

From the "D:\" I assume you are running on Windows10?

Were you able to get previous versions to work? I added the 'encoding' to get past a weird character crash that was killing it for Chris on a PC.

I do not see that issue on Linux, and I don't have easy access to a Windows PC with python3. A few questions:
- Are you running in the Linux_under_windows subsystem thing?
- It looks like you are directly executing the .py script. Does Windows handle the "#!/usr/local/bin/python3" starting line and find python3?
- Can you show me the output from the following:
-> which python3
-> python3 --version

I'll see if I can find similar issues in the meantime. If you edit the file and remove 'encoding="utf8"' everywhere (two instances, I think) it may fix the issue for you and you may not run into the character encoding issue that caused me to add it.

Respondido : 23/10/2018 3:19 pm
Paul Meyer
(@paul-meyer)
Honorable Member
Topic starter answered:
Re: script to drop temperature during ramming

Ah, I get it, I think.

Check out this link: Python3 Encoding invalid keyword

My guess is that Windows is seeing the ".py" ending and running the script with a version of python2. The script needs python3. That link gives some pointers as to how to install python3 on windows and how to run the script using python3.

Here are some other pointers:
Using Python3 on Windows

You can also try to install the "Linux subsystem for Windows", a better general purpose approach:

Linux Subsystem for Windows install
Python in LsW

Respondido : 23/10/2018 3:30 pm
nuroo
(@nuroo)
Reputable Member
Re: script to drop temperature during ramming

Hey Paul.
I'm at work right know. I'll check when I get back home. But yes windows 10 directly. No virtual box Linux. I was able to use your script before. I replied on first page of this thread, so commit a23f5a3 worked for me at that time. Or the commit right after a23f5a3.
I will post the info requested later today.

Also I will try:
Python3 cool_ram.py

Prusa MK3 preassembled (R2/B6) > (R3/B/7)
Prusa MK2.5 kit > MK3 > MK3+MMU2 (R3/B/7) 😀
Prusa SL1 3D printer + Curing and Washing Machine (day1 order)
Taz6
CR10s4
Delta 3ku

Respondido : 23/10/2018 3:43 pm
Paul Meyer
(@paul-meyer)
Honorable Member
Topic starter answered:
Re: script to drop temperature during ramming

I think it worked before because the script happened to be python2 compatible. Try the python3 if you can, and I'll see if I can restore python2 compatibility.

Respondido : 23/10/2018 4:30 pm
nuroo
(@nuroo)
Reputable Member
Re: script to drop temperature during ramming

update:
commit c8dab2b works for me on WIndows 10.... U fixed something 🙂

-> which python3
D:\Downloads\test git>which python3
'which' is not recognized as an internal or external command,
operable program or batch file.

-> python3 --version
D:\Downloads\test git>python3 --version
'python3' is not recognized as an internal or external command,
operable program or batch file.

-> python --version
D:\Downloads\test git>python --version
Python 3.7.1rc1

strange, some path issue - but the install added python to path, idk

Prusa MK3 preassembled (R2/B6) > (R3/B/7)
Prusa MK2.5 kit > MK3 > MK3+MMU2 (R3/B/7) 😀
Prusa SL1 3D printer + Curing and Washing Machine (day1 order)
Taz6
CR10s4
Delta 3ku

Respondido : 23/10/2018 8:52 pm
Paul Meyer
(@paul-meyer)
Honorable Member
Topic starter answered:
Re: script to drop temperature during ramming

Fixed (I hope). I've moved all the file output to a function, and the function detects python2/python3 and does the right thing. I've tested it on python2.7 and python 3.6, seems to not crash (always a good thing) and create exactly the same output file for my four color kitten.

pushed to github.

Respondido : 23/10/2018 9:16 pm
Joe
 Joe
(@joe-16)
Eminent Member
Re: script to drop temperature during ramming

Giving this a try now. really hopeful because I've had terrible luck with my tips stringing and jamming at all sorts of temp/ram settings.

Respondido : 24/10/2018 7:49 am
Jbravo88
(@jbravo88)
Trusted Member
Re: script to drop temperature during ramming

I apologize did someone ask already but how do you use this script? I have a Windows 10 base PC to run slic3r and use octopi pi on rasp 3.

Respondido : 24/10/2018 1:33 pm
VertigoMakes
(@vertigomakes)
Active Member
Re: script to drop temperature during ramming

Glad I found this, I had a similar idea and created my own script.

https://gist.github.com/vertigo235/2b3d2eef1ceafe65ee42b2633e84c37e

Works by just adding the ramming temp to the filament start g-code

; RAMMING_TEMP: 195

I was trying to get 870 PLA to work and I'm still having trouble, look forward to seeing results from other folks lowing the ramming temperature.

Respondido : 24/10/2018 3:16 pm
Jbravo88
(@jbravo88)
Trusted Member
Re: script to drop temperature during ramming


Glad I found this, I had a similar idea and created my own script.

https://gist.github.com/vertigo235/2b3d2eef1ceafe65ee42b2633e84c37e

Works by just adding the ramming temp to the filament start g-code

; RAMMING_TEMP: 195

I was trying to get 870 PLA to work and I'm still having trouble, look forward to seeing results from other folks lowing the ramming temperature.

Hi Joshua, later this afternoon I'll try this and will report back.

Respondido : 24/10/2018 3:31 pm
Paul Meyer
(@paul-meyer)
Honorable Member
Topic starter answered:
Re: script to drop temperature during ramming


update:
commit c8dab2b works for me on WIndows 10.... U fixed something 🙂

I made the script python2 compatible. I think Windows is defaulting to python2 (which I've never used), but with some research and a bit of gymnastics I was able to make it work and test it on python3 and python2.

Respondido : 24/10/2018 3:45 pm
Joe
 Joe
(@joe-16)
Eminent Member
Re: script to drop temperature during ramming

The script is working but my prints are still failing

I've tried print temps of 200 with 1.5s ram and 2.5s ram
I've tried ram temps of 180, 185, 190 (failed to eject)
I've tried ram temps of 193 (too stringy)

I guess I'll keep trying, maybe this Atomic filament is just not the right one for the MMU.

Respondido : 24/10/2018 3:51 pm
Página 3 / 5
Compartir: