FabMo is a software framework for next generation CNC. fabmo.js connects app developers to their tool by way of the FabMo API. Don't know FabMo? Go FabMo!
fabmo.js provides the complete API needed to communicate with a FabMo tool from your app. Key functions include:
var fabmo = new FabMoDashboard();
console.log(fabmo.version);
// This runs immediately
fabmo.runGCode('G0 X0 Y0');
var gcodes = [
'G0 X0 Y0 (Go Home)',
'G0 Z0.5 (Pull Up)',
'G0 X1 Y1 (Go to 1,1)',
'(Cut a square)',
'M4 (SPINDLE ON)',
'G1 Z-0.125 (Plunge 1/8")',
'G1 X2',
'G1 Y2',
'G1 X1',
'G1 Y1',
'G0 Z0.5 (Pull Up)',
'M8 (Spindle off)',
'G0 X0 Y0 (Go Home)'
];
fabmo.submitJob({
file : gcodes,
filename : "square.nc",
description : "Cuts a 1-inch square at 1,1"
});
fabmo.on('status', function(status) {
document.getElementById('x-display').innerHTML = status.posx;
document.getElementById('y-display').innerHTML = status.posy;
document.getElementById('z-display').innerHTML = status.posz;
});
Check out the full API documentation for more details.
There are lots of good examples online of apps that use fabmo.js - Choose one that's similar to your application: