Fork me on GitHub

fabmo.js

Bring apps to the world of CNC!

fabmo.js fabmo.min.js

Overview

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!

Features

fabmo.js provides the complete API needed to communicate with a FabMo tool from your app. Key functions include:

Usage

Get Started


var fabmo = new FabMoDashboard();
console.log(fabmo.version);
        

Run Some Code


// This runs immediately
fabmo.runGCode('G0 X0 Y0');
        

Start a Job


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"
});     
        

Get Notified


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;
});     
        

API Documentation

Check out the full API documentation for more details.

Example Apps

There are lots of good examples online of apps that use fabmo.js - Choose one that's similar to your application: