Hello Guest it is December 12, 2024, 10:21:42 PM

Author Topic: Is there a way to set a shortcut key or Hotkey for Jog Increments? (MACH3)  (Read 6690 times)

0 Members and 1 Guest are viewing this topic.

So I'm making a pendant for my CNC that just sends basic key strokes to the computer. What I'm looking for is a way to set the jog increment based on a single button I click but I can't find any information on how to set the jog increment up using a hot key. (I'm not talking about alt+J, I'm not looking to cycle it, I want to click a specific increment)

So what I want to do is as follows
Press Switch 1 → Switch 1 sends a [hot key command] to computer → Jog increment set to 1.000
Press Switch 2 → Switch 2 sends a [hot key command] to computer → Jog increment set to 0.100
Press Switch 3 → Switch 3 sends a [hot key command] to computer → Jog increment set to 0.010
Press Switch 4 → Switch 4 sends a [hot key command] to computer → Jog increment set to 0.001
Press Switch 5 → Switch 5 sends a [hot key command] to computer → Jog increment set to 0.100

Now as far as hot key commands go, I'm trying to keep it simple like
Ctrl+Alt+Shift+I
Ctrl+Alt+Shift+O
Ctrl+Alt+Shift+P
Ctrl+Alt+Shift+[

and I'd like to not have to refer to some VB script or something even more extravagant than that.

For each increment. So if I hit Ctrl+Alt+Shift+I, the increment is set to 1.000, and if I hit Ctrl+Alt+Shift+P, the increment is set to 0.010 and if I hit Ctrl+Alt+Shift+O, it's 0.100 and so on.

And lastly, in case anyone is confused. I want to make these buttons essentially : https://i.imgur.com/pQkZUcm.png

Offline Graham Waterworth

*
  • *
  •  2,747 2,747
  • Yorkshire Dales, England
Re: Is there a way to set a shortcut key or Hotkey for Jog Increments? (MACH3)
« Reply #1 on: December 05, 2019, 12:20:41 PM »
You can set hot keys in the screen editor for most functions
Without engineers the world stops
Re: Is there a way to set a shortcut key or Hotkey for Jog Increments? (MACH3)
« Reply #2 on: December 05, 2019, 04:22:26 PM »
You can set hot keys in the screen editor for most functions

Do you have a tutorial you could share?

Offline Graham Waterworth

*
  • *
  •  2,747 2,747
  • Yorkshire Dales, England
Re: Is there a way to set a shortcut key or Hotkey for Jog Increments? (MACH3)
« Reply #3 on: December 05, 2019, 07:15:49 PM »
There are lots of videos on youtube about screen4 and machscreen for editing mach3 screens
Without engineers the world stops
Re: Is there a way to set a shortcut key or Hotkey for Jog Increments? (MACH3)
« Reply #4 on: December 05, 2019, 11:09:09 PM »
There are lots of videos on youtube about screen4 and machscreen for editing mach3 screens

Yeah that doesn't much help me and is the reason I'm here. I'm trying to find a way to SET a hotkey to each individual increment. So one hotkey for 1/1 step, one hotkey for 1/10 increment, one hotkey for 1/100 increment and one for 1/1000 increment. Right now all I have is Alt+J which just cycles the increments and I already know how to set or change that hot key to anything else.

Offline Graham Waterworth

*
  • *
  •  2,747 2,747
  • Yorkshire Dales, England
Re: Is there a way to set a shortcut key or Hotkey for Jog Increments? (MACH3)
« Reply #5 on: December 06, 2019, 02:37:28 PM »
If I remember correctly you can write to DRO number 828 to set the current jog increment so you would have to setup some buttons and do a SetOEMDRO(828,step_value_required) in the VB script setting.

There are also a group of buttons that use the preset values in the General Config screen they are OEMButton 191 to 200 so you could just put them on your screen and assign hot keys to them.

 
« Last Edit: December 06, 2019, 03:14:16 PM by Graham Waterworth »
Without engineers the world stops
Re: Is there a way to set a shortcut key or Hotkey for Jog Increments? (MACH3)
« Reply #6 on: December 06, 2019, 03:56:49 PM »
OK so I figured it out late last night.

Here's the steps for future readers:

1) Using Mach3Screen or Screen4, make 5 buttons on Screen 50 ( the Mpg screen ) and drop them off in the blank space to the right where the '(' and ') buttons are or on the screen if you intend to use these buttons and not a physical button panel (like I am)

2) Assign these buttons OEM values 191 thru 195 (196 thru 200 are the same thing)

  • 191 = 1.0000
  • 192 = 0.1000
  • 193 = 0.0100
  • 194 = 0.0010
  • 195 = 0.0001

3) Assign each of these buttons the hotkey of Ctrl+1, Ctrl+2, Ctrl+3 and so on.

Once you do that, save the .set file in the MACH3 Directory and set that to screen you want when you open MACH

If you're doing this to make a control panel with an arduino, I can post the code later if you'd like but the gist is that you just assign the button from the control panel to execute that short cut.

I'll try to post some screen shots tonight as well