A Python client that is able to send commands to the BlackBox controller and interact with the OpenBuilds CONTROL GUI.The connection is established through the use of the Socket.io library that enables real-time bidirectional event-based communication between a client and a server.
The purpose of this script is to be able to control the OpenBuilds ACRO 2020 Gantry System through an external controller. It will act as a main controller to all of the additional components that will be added to the system. Eventually, we plan to implement an OptiTrack motion capture system to aquire locational data, and we would like it to be able to be controlled through this same python script such that we have everything in one place.
- python-socketio (https://python-socketio.readthedocs.io/en/stable/intro.html#what-is-socket-io)
- OpenBuilds CONTROL (https://github.com/OpenBuilds/OpenBuilds-CONTROL/blob/master/index.js#L2234)
- GRBL Firmware (https://github.com/grbl/grbl)
- Monitor system status
- Monitor position of gantry and output to text file
- Recieve responses directly from GRBL (type, response)
- Send g-code commands to CONTROL to be executed by machine
G-Code Command List
-- in progress--
G G1
G2
G3
From https://builds.openbuilds.com/threads/reading-values-from-openbuilds-control-software.15867/
socket.emit("runJob", { #data = "G1 .... gcode block with \n linebreaks etc", #isJob = true, // if isjob==true, it gets stored and can be retrieved when the UI restart/refreshes, use for actual jobs, for quick little tasks, set to false #completedMsg = "String you want to print in control in a popup on completion" #});