Coder Social home page Coder Social logo

cncjs-kt-ext's Introduction

Auto-leveling extension for CNCjs

CNCjs Auto-leveling extension intended to be used primarily for PCB isolation milling. Currently only Grbl is supported/tested.

It will probe the surface (within gcode boundaries (xmin,ymin) - (xmax,ymax)) and transform the gcode currently loaded to cncjs and load auto-leveled gcode into CNCjs, ready to be run.

Install and run

git clone https://github.com/kreso-t/cncjs-kt-ext.git
cd cncjs-kt-ext
npm install
node . --port /dev/ttyACM0

Once started it will (by default) connect to local cncjs server and register it self for listening and sending commands (similar way as i.e. cncjs keyboard pendant).

To list all start options use:

node . --help

Available Commands

Command Description
(#autolevel) Probes the Z-offset in a grid way fixing the uploaded gcode.
(#autolevel_reapply) reapply previous probed Z-offset values when importing a new gcode

Installation with pm2

If you manage cncjs with pm2, you may want to manage this extension the same way. This assumes you've already set up cncjs with pm2.

git clone https://github.com/kreso-t/cncjs-kt-ext.git
cd cncjs-kt-ext
npm install
cp pm2.example.config.js pm2.config.js
pm2 start pm2.config.js
pm2 save

This will start the extension in pm2 using the first user in your cncrc. If you wish to use a different user, you can modify the pm2.config.js to with command line options for the user name and id.

How to use

Jog your tool at PCB origin point and zero it (i.e. set work coordinates: 0,0,0). Then, by using a macro you may send the following command:

(#autolevel)

Without any options it will probe every 10 mm, with travel height at 2 mm, and probing feedrate 50 mm/min.

Please, note that this command will be ignored when put inside the gcode file or type it in the console, you must run it from a macro.

Once the probing is finished and gcode updated you may run the gcode.

You can customize the probing distance, height and feedrate you may use the following syntax:

(#autolevel D[distance] H[height] F[feedrate] M[margin])

If a new related gcode is needed, after the first mill process. Autolevel values can be reapplyed with the following command:

(#autolevel_reapply)

In the case of the different drill bit lengths, after changing the drill bit to another having different length, you have to Z-Probe the PCB surface at approximately starting point (xmin, ymin) and set the Z WCO to zero again before firing the #autolevel_reapply command.

Custom usage example

(#autolevel D7.5 H1.0 F20 M0.2)

This will instruct it to use probing distance of 7.5 mm (i.e. distance in XY plane between probed points), travel height 1 mm and feedrate 20.0 mm/min considerin a margin of 0.2 mm around the PCB area.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.