3D-to-5D-Gcode-php

From RepRap
Revision as of 09:05, 20 July 2009 by ErikDeBruijn (talk | contribs)
Jump to: navigation, search

3D-to-5D-Gcode.php is A GPL'd script written and maintained by Erik de Bruijn. It has many features, the primary function is to convert skeinforge's GCode to GCode that the 5D firmware understands. It adds the E-codes and removes M101, M102 and M103 codes. This free's the firmware from having to do square root calculations. The script can also manipulate GCode according to rules that you define and it can compensate for backlash in your cartesian bot.

The code for this script can be found in subversion, here (in /reprap/trunk/users/erik/). You can also use subversion to check out just my files, in the following way:

# svn co http://reprap.svn.sourceforge.net/svnroot/reprap/trunk/users/erik

Feature list

- Make 3D GCode into 5D Gcode
- Backlash compensation
- String replacement
- GCode manipulation


Feature: Backlash compensation

On the left, you see a chess pawn printed without backlash compensation. On the right, this "software" setting was turned on. Reducing backlash becomes disproportionately harder when you need to go further. You hit constraints like exceeding a healthy belt tension, running the motors with too much power, etc.

This play is not there on my X axis, because that one doesn't use microstepping and has more resonance/vibrations. My theory is that this vibration causes the XY-carriage to settle closer to where it's supposed to be, instead of lagging a bit behind when it was supposed to move.

Now, the script adds an amount of movement that you can configure per axis. It was actually easier than I thought, so it's definitely something to add to the Java host as well. You need to set up 4 numbers, backlash_X_forward, backlash_X_reverse, backlash_Y_forward, backlash_Y_reverse. I've made the unit milimeters. The compensation simply needs to know the direction in which it was moving, and add the backlash. The static friction seems to be symmetrical, but the length of the belt (that stretches slightly) connecting the pulley to the Y axis, is asymmetrical.

Feature: String replacement

It can also do simple find- and replace's on Gcode lines, which I currently use to speed up the raft making (of which the base layer is slow in Skeinforge, with a reason I now learned). All of the features can be turned on or off in a configuration file or in the top section of the php script.

Feature: GCode manipulation