JOG with PC joystick

I tried it on Windows, same behavior. That is, the numpad buttons don’t JOG. Interestingly all other shortcuts like Ctrl+=, etc. work as intended.

I found something though:
IF the Cuts/Layers or the Console window is selected, and i click between the windows to the right and the work area at the left (so the focus is not on anything), then i press any numpad buttons (up/down/left/right), my machine starts to move the head diagonally, so i click stop so it doesn’t crash.
This came up in the console window:
Grbl 1.1g [’$’ for help]
[MSG:’$H’|’$X’ to unlock]
[MSG:Caution: Unlocked]
ok
<Idle|MPos:24.585,10.075,0.000|FS:0,0|WCO:-140.000,-75.000,-52.000>
ok
Starting stream
Stream completed in 0:01
ALARM:3
Reset while in motion. Grbl cannot guarantee position. Lost steps are likely. Re-homing is highly recommended.
[MSG:Pgm End]
ok

Would you like to explain to me what a joystick can be used for in LightBurn? Thanks

The PC is at one side of the room, the laser is at the other.
Ran USB cable from PC to laser, where both the controller and the joystick is plugged in.
Then when i put in or move a tiny work-piece, can use the joy to JOG the head and the laser dot at the proper starting point. Maybe start and stop the cut with buttons on the controller. The point is, this would be a great solution for those who have the controlling PC farther away.
Probably i’d prefer a solid physical joystick over clicking on the screen anyways, so i can look at the machine head while controlling it.

Thanks for the explanation

Hi,

While i would still like to have the feature of connecting a PC gamepad to do the JOG in LightBurn, i decided to give it a try and write a program that can do this.
The test version is ready, please keep in mind that this is my very first Linux program.
It works like this:
-reads the joystick
-jumps to fixed coordinates and presses the left mouse button
It has it’s limitations, for example lightburn has to be full screen (so the coordinates of the jog buttons are known) and the move window has to be the active one (this can be ‘fixed’ if i make the mouse jump to the ‘Move’ tab and click it for every gamepad button press)

Now while this can do what i want, all i have to do is start the program and make lightburn full screen, then i can jog away with a gamepad, it would be really nice to have this feature built in…

The numpad jog should work. Try this:

  • Go to Help > Enable Debug Logging
  • Click somewhere in the grid / edit window, to make sure it has the keyboard focus
  • Make sure Numlock is on
  • Press the keypad numbers, one at a time, from 1 to 9
  • Quit LightBurn

In your Documents folder you’ll find a file called LightBurnLog.txt - post it here.

Hi,
did what you asked for.
First i tried to press just the number ‘6’ to jog right. Second try i pressed all the keys from 1-9.
In both cases the machine started to move the head to the lower left corner, both axis at the same time.
Since i have the limit switches at the other end, i had to abort by clicking on the STOP button.
First try:
LightBurnLog2.txt (1.8 KB)
Second try:
LightBurnLog.txt (1.8 KB)

my windows number pad does not jog the laser either.

You have a workspace offset programmed.

Type $# in the console and press enter, and notice that the G54 line isn’t zeros.

Then type: G10 L2 P1 X0 Y0 and press enter to zero it. Then try again.

Click in the edit window first, and make sure NumLock is on, then try again.

1 Like

Hi,

THANK YOU! Now it works, could you elaborate a bit on what was wrong? I don’t remember programming anything regarding the workspace offset. Does this got entered to the GRBL controller maybe from another application, or is this a LightBurn thing?

Also, the numbers 1 and 3 move the head diagonally, instead of moving it up and down. Up and down works fine if i click on the JOG buttons.

1 Like

Look at where 1 and 3 are on your number pad - they’re in the corners, and so are 7 and 9, so they move diagonally. 2 and 8 move up and down, and 4 and 6 move left or right.

And a workspace offset will happen any time you zero the spindle to a workpiece in CNC software.

Thank you again for taking the time to answer!

Sorry, i meant physically up and down (Z+/Z-), not the Y direction.
I thought the numpad is mapped like the jog buttons, that’s why i thought 1 and 3 might move the head in the Z direction.

Also, why a workspace offset would affect JOG?

Jog sends the laser to exact locations (it reads the current position, adds some amount to the distance, makes sure it’s within the laser area, then sends the command). If the position value isn’t read properly, the destination won’t be correct.

Great!
I red up on the offsets and now it’s clear.
Any chance there is a key for moving the Z axis?

I don’t believe there is, no.

In CNC world Mach3 is using PgUp/PgDn for Z-axis moments.

Sorry, but how would that help me with LightBurn?
Also, the small program i wrote can assign any gamepad buttons to click on any program buttons, so i can make this work. If LightBurn had key assigned to Z+/- then i could send keystrokes instead of playing with the mouse.

Actually,

It is a feature request, please in a future version, add gamepad/joystick JOG to LightBurn.
Then the window focus problem would be solved also, no matter where the focus is, the jog with gamepad would work.

Since there is no shortcut key to move head in Z direction, would it be possible to add USB gamepad JOG support? As a fellow programmer i can send you the information on reading the joystick both in Windows and Linux.