Skip to content

Joystick control

Sven edited this page Aug 11, 2019 · 10 revisions

Joystick control

The machine can be controlled via

  • mouse at the user interface inside the virtual joystick control
    virtual joystick
    Note: if checkbox is checked, current move will be interruppted imediatly when releasing the mouse button. Otherwise, the distance of the last move will be finished.
  • external game pad
    The control range of the analoge joysticks are divided into 6 segments to get same functionality as the virtual joystick has. Using the same settings, described below.
  • control via keyboard (hot-keys) is supported since version 1.2.2
    The current distance to move is marked in green and can be changed via hot-key or mouse click.
    virtual joystick

The idea is to get a continuous movement as long as the joystick is triggered, and to stop directly. With grbl 0.9 it wasn't easy to implement. My solution was to send every 0.5 seconds a command for a short movement - a distance which could be reached almost within 0.5 seconds. To avoid an extra edit box for the feed rate I designed the control above, which offers 5 different speeds for each direction.

Setup

virtual joystick
For each feed rate option (Pos 1 to 5, from inner to outer border of control) the distance (step width) and feed rate (speed) must be set.
To avoid a halting movement, an 'overlap' is recommended: the next movement command must be sent before the previous movement is finished.
To do so, set a desired step with an calculate the needed feed rate: the feed rate must be almost step-with*60/0.5 mm/min.
E.g. a step-with of 10 results to a feed rate of 1200, to avoid halting I choose 1000 for the default setup.

Note: the maximum travel speed is limited by the grbl Settings $110 to $112.

An optional 4th axis (other grbl branch) uses same settings as the Z axis.

Game pad

Check button number of your game pad just by pressing a button, in the setup tab, the corresponding field will light in green.

To each button you can assign

  • a file (with path) containing GCode to process
  • one ore more lines with GCodes, lines are seperated by ';'
  • special commands as described on the tab for homing, start streaming or feed rate override

Don't forget to enable the game pad at the upper left check box.

Note: real control is enabled after closing the setup window