Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

RapidReversalify with Python

by jmil, published

RapidReversalify with Python by jmil Jan 18, 2011

Thing Info

1584Views 981Downloads
Report Thing


UPDATED: you need to pause between reverse and forward commands. still working out why, exactly...

This is for testing rapid reversal in gcode for RepRap, MakerBot, etc. It does a find and replace of M103 and M101 lines in your gcode file.

Detailed instructions are in the top of the file.

Use it like the following:
python RAPID_REVERSALify.py FILE.gcode printRPM reversalRPM waitTime
python RAPID_REVERSALify.py oozebane.gcode 2.857 25 200

you will get the printout:
we will print at 2.857 RPM
we will rapid reverse at 25.0 RPM
we will wait for 200 ms during rapid reversal

and the file:
will be created


First, every M103 command is replaced with:
M103 (Extruder off)
M102 (Extruder on, RAPID REVERSAL)
G04 P__WAIT_TIME (Wait t/1000 seconds)
M103 (Extruder off)

Then, every M101 command is replaced with:
(reaccelerate to prev position)
M101 (Extruder on, RAPID FORWARD)
G04 P_WAIT_TIME (Wait t/1000 seconds)
M103 (Extruder off)
M101 (Extruder on, forward)

Thing Info

1584Views 981Downloads
Report Thing

Liked By

View All


Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

I've just started learning Python, so I'm a noob at this, but is there a way to roll this into the Skeinforge tool chain? I'm wanting to convert to Stepper extruders, but was a bit confused on this. This looks great though! :-)

jmil - in reply to randyy

it's still highly experimental at this point. but if you'd like to try it out just build the latest replicatorG from the 5axis-ui branch on http://github.com/makerbot/replicatorghttp://github.com/makerbot/rep...

you may also need the very latest build of the firmware, also available on github