I've just got the 3dchameleon and I think its mk3.1 (3 at least). I set it up on an ender 3 pro. I've taken off the old extruder and want to use the 3dchameleon filament loader drive as the extruder. However T0 and T1 drive backwards. So I installed python and setup prusasliser to do the post processing, but it is not working. I don't get the backup file, so that means python is not processing the output g-code file. I'm using prusaslicer 2.5.2 and python 311 on win11. Any tips to make it work? Or is there any other way to do it? Also for extruder to hotend measurement in this setup do you measure from the 3dchameleon extruder or from where you park the filament 1inch before the y adapter?
top of page
To test this feature, visit your live site.
MK3 on Ender 3 pro mode 1 extruder replacement, T0 and T1 run backwards, how to fix?
MK3 on Ender 3 pro mode 1 extruder replacement, T0 and T1 run backwards, how to fix?
16 comments
Like
16 Comments
bottom of page
ps. How many of the tension tuning sliders do I need?
You are right the python is working. I does show the 3dchameleon header in the gcode file. However I still haven't got it working properly. I can get two (T0,T1) going in the right direction, but two (T2,T3) will go wrong or vice versa. In the reversedrive.py file for tools T0, T1, T2, T3 I can put True, True, False, False OR False, False, True, True and T0 and T1 will be correct and T2 and T3 will be wrong and vice versa, but I can't get all going in the right direction. Here is my reversedrive.py file data:
#!/usr/bin/python
# 3D Chameleon - T2 and T3 reverser post processor
# Copyright 2020 - 3D Chameleon, LLC, All Rights Reserved
import re
import os
import sys
reverse_mod = True
# set io files
file_input = sys.argv[1]
file_output = re.sub('.gcode.pp$', '.reversedrive.gcode', file_input)
if os.path.exists("{}.backup".format(file_input)):
os.remove("{}.backup".format(file_input))
if os.path.exists(file_output):
os.remove(file_output)
if (file_output == file_input):
file_output = "{}.reversedrive".format(file_input)
with open(file_input) as input:
with open(file_output, 'w', newline='') as output:
#print >> output, "; 3D Chameleon Postprocessor"
#print >> output, "; Copyright 2020 by 3D Chameleon, LLC"
#print >> output, "; All Rights Reserved"
#print >> output, ";"
#print >> output, ";"
print("; 3D Chameleon Postprocessor", file=output, end='\n')
print("; Copyright 2020 by 3D Chameleon, LLC", file=output, end='\n')
print("; All Rights Reserved", file=output, end='\n')
print(";", file=output, end='\n')
print(";", file=output, end='\n')
for line in input:
line = line.strip()
# ignore extruder
if (re.search('- 3DC Process Tool 0 -', line)):
reverse_mod = False
# ignore extruder
if (re.search('- 3DC Process Tool 1 -', line)):
reverse_mod = False
# flip extruder direction
if (re.search('- 3DC Process Tool 2 -', line)):
reverse_mod = True
# flip extruder direction
if (re.search('- 3DC Process Tool 3 -', line)):
reverse_mod = True
# reverse E values if in T2 or T3
if(reverse_mod):
if('G92 E' in line):
line = line.replace("E","E-")
line = line.replace("E-0", "E0")
if(('G0' in line) or ('G1' in line)):
if ('E-' in line):
line = line.replace("E-", "E")
else:
if ('E' in line):
line = line.replace("E", "E-")
# normal output; copy to new file
#print >> output, line
print(line, file=output, end='\n')
# backup old file
os.rename(file_input,"{}.backup".format(file_input))
# rename temp file to original filename
os.rename(file_output, file_input)
Here's an example from my desktop via the command prompt. C:\Users\wjsteele\AppData\Local\Programs\Python\Python39\python.exe "D:\Program Files\Prusa3D\PrusaSlicer\reversedrive.py" ./test2.gcode.pp By default, the file will have the pp extension after it from PrusaSlicer which will then load that file. The backup file should exist in your temp directory... once it's loaded the pp file, it will save it as the normal gcode file. One sure fire way to see if it's running is to look at the first line of the gcode file... it'll have this block of code at the start: ; 3D Chameleon Postprocessor
; Copyright 2020 by 3D Chameleon, LLC
; All Rights Reserved
;
;
; generated by PrusaSlicer 2.6.0-alpha4+win64 on 2023-05-17 at 23:35:51 UTC If you see that, it's running. If not, please email me the gcode file and your Tool Change GCode. Bill
There is no error to report, just no processing being done. I did deliberately mistype the command and then an error popped up. Am I right that there should be a backup file if its done correctly? I do not get one. I moved prusaslicer to C:\ps to simplify the directory address in case it didn't like long directory names or with spaces etc. Yes reversedrive.py is in the same directory as the prusaslicer executable. How do you run is manually, do you mean from a windows powershell window? If so, can you give an example?
Also, can you run it manually (using the same command line) from the command prompt to see what, if any error, is being shown?
Is the ReverseDrive.py file inside the same directory as the PrusaSlicer executable? I see you have it in a c:\ps directory?
Need a little more information on what error you're seeing. PrusaSlicer should be giving you an error if you've set up the command and it's not able to process it. Also, make sure you're "Exporting" the file... as that's the only time it'd actually run the post processor. Can you post a screen shot of your PrusaSlicer's Output Options tab? Also, make sure you have the "reversedrive.py" file in the PrusaSlicer directory next to the executable, otherwise it won't run. Here's screen shot of mine: