Welcome! Log In Create A New Profile

Advanced

Using Servos in Sync with Printhead Movements

Posted by jessicabrenner 
Using Servos in Sync with Printhead Movements
August 01, 2015 04:33AM
I'd like to move the printhead to a specific "cleaning" location behind the stage of my custom printhead, then activate a servo that will clean the needle tip of my paste extruder. I want to make a custom M-code that will do this. I'm using Marlin on Ramps 1.4.

If I use plan_buffer_line to move the printhead to the cleaning location, then use the servo.write command, will Marlin wait for the move command to finish before activating the servo? If not, then could I use st_synchronize() after plan_buffer_line, but before the servo command in order to make sure the servo only moves after the printhead has moved to the desired location?
Re: Using Servos in Sync with Printhead Movements
August 01, 2015 11:33AM
At the end of a print, why not just retract some filament back into the extruder, then move the extruder off of the print area, bring it down to 0 and then have it move across on the print bed, thereby scraping the nozzle clean?
Re: Using Servos in Sync with Printhead Movements
August 01, 2015 01:18PM
If it's at the beginning or end of the print, then simply put the GCode in the beginning/end GCode in your slicer. Easy enough to move and use the servo without anything special.
Re: Using Servos in Sync with Printhead Movements
August 01, 2015 10:02PM
madmike8, I'd like to be able to initiate the cleaning at any point during the print.

rcjoseb, that will work for the plastic extruder, but I'm using a pressure-based paste extruder (no retraction). The paste gets stuck on the sides of the needle tip sometimes and causes smearing issues.

Ideally I could just types something like M9999 and hit enter, rather than type a whole bunch of Gcode. What I could do is write the gcode out before hand, then copy and paste it into pronterface whenever I need it. But I don't think I can copy and paste multiple commands into pronterface.

Secondly, I'm not sure if the servo command will be executed instantly, or if it will wait to be executed until its turn in the buffer. For activated a pin using M42, it executes quickly instead of waiting for the codes in the buffer to execute, so I was thinking that maybe the servo will behave similarly.
Sorry, only registered users may post in this forum.

Click here to login