A simple python script for use with the Axis interface for Emc. It allows you to retrieve your gcode from a mysql database.
In a manufacturing environment, where there are multiple emc controlled machines, it may be helpful for all machines to be able to access a central database of components. More idealistically, an internet based database of components could be established, enabling all emc users around the world to have access to a common library of parts. Other uses are possible.
To try this out, you need to configure the script, and then set up a mysql database to hold your gcode.
The script is HERE. A good plan is to store it with any other emc scripts you might have. You will have to edit the script, to add your mysql user name, and password. These are clearly marked. Remember to set the executable flag on the file.
Check your Axis INI file, to ensure that the filter section has an entry to specify an interpreter. It should look something like this:
|PROGRAM_EXTENSION = .py Python Script|
|py = python|
This SQL FILE, can be used to create the database, and includes one sample part. Use it as follows:
cat emc.sql | mysql -u root
The mysql root password will probably be required.
Fire up your emc, and open the mysql.py file. You should see this:
Select your component, click on import, and the gcode will be imported into Axis.
If you wish to leave a comment, you can do it HERE.