Skip to content

Billiam/cncjs-pendant-keyboardreader

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 

cncjs-pendant-keyboardreader

A CNCjs pendant for remote jogging using a keyboard. Implements GRBL's "smooth jogging" ($J commands).

I'm currently using this with a Logitech K400+ and GRBL

Pre-requisite

Node.JS and npm must have been installed. This version of the pendant was tested using Node.JS v10.19.0

Installation

After cloning the repository to your work directory, change into this directory and run

npm install

Usage

CNCjs must be running (either the standalone app, or as a server)

From a shell/command window, go to cncjs-pendant-keyboardreader directory, and run:

bin/cncjs-pendant-keyboardreader --socket-port <socket_port> --port <port> --device <device>

To determine <socket_port> value:

  • On Windows, if using the CNCjs standalone app, go to the "View" menu, click "View in browser", this should open a browser window to a URL that will look something like "http://127.0.0.1:57325/#/workspace". The number right after the "127.0.0.1:" part is the XXXXX to be passed along.

  • On Linux, if using the CNCjs server, the <socket_port> value is normally 8000, unless specified otherwise.

To determine <port> value:

This is the name of the serial port that CNCjs uses to connect to the machine (see "Port" field in the "Connection" widget in CNCjs)

  • On Windows, <port> will often be something like "COM5"

  • On Linux, <port> will often be something like "/dev/ttyACM0"

Pass --help to bin/cncjs-pendant-keyboardreader for more options.

To determine the <device> value:

run bin/cncjs-pendant-keyboardreader --list-devices

Use the path value for the <device> argument. On linux, this may be something like /dev/hidraw1

If execution is successful, you should see something like this:

Connected to ws://{loooong string of characters here}

Connected to port <port> (Baud rate: 115200)

Jogging key map

At this point, the pendant will react to the following keys:

  • pressing the left,right,up,down,i,k keys will jog the machine by the FINE step size, along X/Y/Z
  • holding the Alt key while pressing these jog keys will jog by the MEDIUM step size
  • holding the Ctrl key while pressing these jog keys will jog by the LARGE step size

The distances for FINE, MEDIUM and LARGE can be modified in the source code, they are 0.1mm, 1mm, and 10mm by default.

  • /!\ holding the Shift key while pressing a jog key will trigger a CONTINUOUS smooth jog along the selected axis (no need to hold the key). Releasing the shift key will STOP the movement.
  • /!\ holding the Ctrl and Shift keys while pressing a jog key will trigger a faster continuous smooth jog.

Macros and commands:

  • Ctrl + h will home the machine
  • Ctrl + p will execute the macro named XYZ Probe if available.
  • Ctrl + z will execute the macro named Z Probe if available.
  • Ctrl + 1 will execute the macro named Initial Tool if available.
  • Ctrl + 2 will execute the macro named New Tool if available.
  • Ctrl + Shift + Return will dismiss pause notifications and continue. Careful!
  • Ctrl + Shift + r` will resume paused gcode. Careful again!