AnilamPostProcessor - sphasse/sector67-sandbox GitHub Wiki

Introduction

The AnilamPostProcessor is a python script for translating gcode into Anilam-flavor conversational format. It was developed by Scott Hasse for use on the Anilam 1000M mill at http://sector67.org

Details

The Anilam Mill we have at the space is somewhat limited hardware-wise in the program size it can handle. This script is designed to help with the conversion of larger gcode programs into Anilam conversational format so that they can be drip fed to the mill via a serial DNC program.

More details on the gcode specification can be found here:

http://www.linuxcnc.org/handbook/gcode/g-code.html

The conversational format can be found partially described at:

http://www.anilam.com/Uploads/File/Training%20Presentation%20PDF%20Files/3000M_Training_2.pdf

In general since the code generated by this script will ultimately be used to move a machine, the goal of this script is to accurately translate programs, and to fail fast and accurately when that cannot be done. As a result, some of the implementation (most notably convert_to_conversational) probably appears to be implemented in a fairly brittle manner. This is for the most part intentional. Each command and variation handled is explicit, and other unknown commands result in an error.

It is expected this script will have a few primary uses:

  1. For converting programs that are larger than the Anilam 1100 can handle. These programs will then subsequently be drip fed to the mill.
  2. To correctly translate gcode programs that use arcs with IJK coordinates specified incrementally. Although incremental IJK specification is the default in gcode, the Anilam-based translator expects the IJK to be absolute. Although this translator is incomplete, it is superior in that respect.
  3. To avoid multiple round-trips to the mill with floppy disks.

TODO

  • The gcode verifier could be greatly improved. However, since the translation is done rather explicitly, it is hoped this will not introduce any risk to the translation process.
  • Translations for many Anilam functions that have gcode equivalents (peck drill, plane XY, etc.) are not implemented
  • Other enhancements as documented in the issues at http://code.google.com/p/sector67-sandbox/issues/list

Downloading

There are currently no releases. Simply navigate to the source and download the latest version of the anilampost.py script.

Running

The script has been tested with Python 2.7. Sample usage is provided by the script, but as an example:

python.exe -i c:\temp\my-part.g -i c:\temp\my-part.M

You can also specifc an --ignore option to ignore processing of specific words. For instance, to convert output from PyCAM, an appropriate ignore string might be:

python.exe anilampost.py -i pycam-output.ngc -o ANILAM.M  --ignore="^(G40|G49|G54|G61|S.*|M6)$"

Issues

Defects, feature requests, etc. should be logged at http://code.google.com/p/sector67-sandbox/issues/list, and given a tag of "Component-AnilamostProcessor".

Contributing

The source repository is an eclipse pydev project format. Feel free to download and contribute.