Welcome! Log In Create A New Profile

Advanced

Dual Extruder lift with servo Repetier Slic3r

Posted by 3dflo 
Dual Extruder lift with servo Repetier Slic3r
May 08, 2015 07:11AM
Hello everybody,

I need your help in controlling a Servo with Ramps 1.4, Repetier and Slic3r.

I have designed a Dual Extruder that can lift the single nozzles for preventing the extruded, oozing Filament from the inactive Extruder to stick on the printed object.
The lifting of the nozzle is realized by a servo.
Nozzle 1 is down (in printing position) and Nozzle 2 is up (in standby position) when the servo is a its minimum Position. Nozzle 2 is down (in printing position) and Nozzle 1 is up (in standby position) when the servo is a its maximum Position.

I have found out that I can control a servo with de G-Code M340 P S but I have no Idea how to set something like:
If Extruder 1 is active, then do M340 P0 S500 and
if Extruder 2 is active, then do M340 P0 S2500

Is it possible to implement this code to Slic3r or even the Repetier Firmware?


I am thankful for any help.

Best regards

Flo
Re: Dual Extruder lift with servo Repetier Slic3r
May 08, 2015 08:59AM
It is a pity that the variables are 500 and 2500. If you could modify something to allow the variables to be 500 and 1500 instead, then you could put the following in the custom "tool change g-code":

M340 P0 S[next_extruder]500

(Slicer will substitute the digit 0 or 1 for the "next_extruder" variable depending on what tool is about to be selected)

Also find out whether there is any firmware available for your printer controller board that can use tool change macros. The Duet controller has firmware that has that feature, for example, then you can send whatever commands you like both before and after a tool change.

Dave
Re: Dual Extruder lift with servo Repetier Slic3r
May 08, 2015 06:59PM
Thank you! That would work. Is it possible to do something like M340 P0 S[next_extruder*2]500? (Doesn't work, I already checked it)
Re: Dual Extruder lift with servo Repetier Slic3r
May 09, 2015 08:02PM
Quote
3dflo
Thank you! That would work. Is it possible to do something like M340 P0 S[next_extruder*2]500? (Doesn't work, I already checked it)

No, Slic3r does not do arithmetic operations in the G-code, only variable substitution. It would however not be a huge task to load the generated G-code into a text editor and do a global search & replace to change all occurrences of S1500 into S2500

Dave
Sorry, only registered users may post in this forum.

Click here to login