LabVIEW Machine Control Toolkit
The Machine Control Toolkit is a software library for LabVIEW that enables users to control digital fabrication machines that interpret G-Code. The toolkit breaks down standard G-Code commands into VIs that users can easily manipulate to generate G-Code toolpaths and design their own machine control interface. I wrote this software as part of my research at the Tufts Center for Engineering Education and Outreach during the summer of 2017. I also presented this research at the 2017 FabLearn Conference at Stanford.
Currently, digital fabrication tools (such as CNC machines, 3D printers, and Laser Cutters) are trapped inside a black box. Each machine has a default software that it comes with, and interfaces with only that software. However, at the heart of how all of these tools work is something called G-Code. G-Code consists of simple commands and coordinates that tell the machine where to go and what to do. By harnessing the simplicity of G-Code and the modularity of LabVIEW, the machine control toolkit breaks down the black box and enables users to connect their digital fabrication tools to other platforms and devices.
How it Works:
The Machine Control Toolkit transforms standard G-Code commands into LabVIEW VIs. Users can specify inputs, such as position, feedrate, spindle speed, etc, and the VIs will return the G-Code string to perform the desired action. Machines are connected via USB to the computer running the machine control code, and serial communication is used to connect to, read from, write to, and disconnect from a machine.
The Machine Control Toolkit transforms standard G-Code commands into LabVIEW VIs. Users can specify inputs, such as position, feedrate, spindle speed, etc, and the VIs will return the G-Code string to perform the desired action. Machines are connected via USB to the computer running the machine control code, and serial communication is used to connect to, read from, write to, and disconnect from a machine.
Machines are connected via USB to the computer running the machine control code, and serial communication is used to connect to, read from, write to, and disconnect from a machine. The machine control VIs can be placed in a buffer setup (which comes part of the toolkit), to create custom interfaces to control a fabrication machine. This structure allows users to place a set of controls on their front panel, which when changed cause the appropriate commands to be sent to the machine.
Users can also use the Vis in the Machine Control Toolkit to create G-Code programs to then fabricate. The text to G-Code feature allows users to simply type in text, and the VI will generate the G-Code to fabricate that text. The images below show the simple programs for a CNC machine and the uArm Swift Pro, which generate the G-Code necessary to fabricate the phrase "Tufts CEEO". These screenshots also show the preview G-Code feature of the toolkit, which lets users see what their file will look like before fabricating it.
Users can then send arrays of G-Code commands, or entire G-Code files, to their fabrication machine using a VI from the toolkit.
Currently, the toolkit only supports the Grbl CNC firmware and the uArm Swift Pro. However, it could easily be expanded to include more machine firmwares controls for standard laser cutters and 3D printers. Additionally, using this type of modular machine control platform would open the door for users to create their own augmented reality interfaces for CNC devices.
Example Projects Created with the Machine Control Toolkit: