Jogging Shortcut Improvement

I’m a long-time Mach3 user, new to gSender. Mach3 allows selecting normal/rapid/precise jogging without changing the jogging mode in the Jog Control panel.

Example:
Normal X axis jog → cursor left/right
Rapid X axis jog = Shift + cursor left/right
Precise X axis jog = Ctrl + cursor left/right

Could this be done in gSender with macros?

Hi, yes that can be done. Just make a few macros for the different jog coordinates and feed rates and set them as shortcuts.


;// SET JOG FEED RATE
%F = 100 

;// SET JOG DISTANCE
%X = 0.25, Y = 0.25, Z = 0.25

;// SET JOG, MEASUREMENT UNITS AND DISTANCE (INCHES AND INCREMENTAL)
%S= "$J=G20G91"

;//PUT ALL VARIABLES TOGETHER
%JOG = [S] + "X" + [X] + "Y" + [Y] + "Z" + [Z] + "F" + [F]

;// RUN MOTION
[JOG]

This will certainly work, but I’m specifically trying to avoid setting jog speed prior to jogging.

Thanks for your suggestions - I’ll give them a go.

@ColonelClarence Sorry I misunderstood. In your first post, you specifically asked if gSender could do something similar to Mach3 which uses keyboard shortcuts to set normal, rapid and precise. That is what I showed you in gSender.
You don’t need macros to do that.
However, if that is not what you want to do, ignore my advice. No harm done.
As I clearly don’t know what you want to do, I’ll bow out.
I’ve deleted my posts so that they don’t confuse the matter.

@ColonelClarence Yes it can! In our new gSender Edge 1.5.0 version 6, you can jog with these preset shortcuts:

And, you can select a specific speed or cycle through the speed presets with these shortcuts:

So, TLDR;

You can use the presets to adjust speed and jog, or create your own to match your preference.

Cheers,
Stephen

But that still requires you pressing two shortcuts to jog at the desired speed, right? First to set the speed, and the second to jog.

I think what the OP wants is a single shortcut to jog at the desired speed without it affecting the speed presets he would use for the other axes.

Precise+jogX+
Precise+jogX-
Normal+jogX+
Normal+jogX-
Rapid+jogX+
Rapid+jogX-
And the same in the Y axis

1 Like

You’re absolutely correct.

If enough people indicate that this is something they would like, we could add it to the development timeline, but currently a two shortcut press is the solution to change speeds and move.

You may be able to create a macro that sets a speed and direction, then map that macro to a shortcut of your choosing.

Since I’m working on a probing macro that needs similar functionality I figured I’d write a bit more advanced macro for you. I can’t imagine it would be too enjoyable having to make adjustments in eighteen to thirty macros.

A better way to handle a lot of macros is to have one macro for all of the setting.
The only downside is you need to run the settings macro once after starting GSender or if you change any settings values, still a lot better than individual adjustment.

So the first macro is the Setting Macro, at the top is the user inputs for Slow, Normal, and Fast jog speed settings, each with Feed rate, XY-distance and Z-distance values to enter and adjust if needed, right below is the macro units selection entry.

;//////////////////////////
;/// JOGGING MACRO SETTINGS
;//////////////////////////

;/////|||||\\\\\
;//////// JOG SETTINGS ENTRY 

;// SLOW JOG 
%SF = 50;      // SLOW FEED RATE 
%SD = 0.075;   // SLOW DISTANCE
%SZD = 0.025;  // SLOW Z DISTANCE

;// NORMAL JOG 
%NF = 100;     // NORMAL FEED RATE 
%ND = 0.150;   // NORMAL DISTANCE
%NZD = 0.050;  // NORMAL Z DISTANCE

;// FAST JOG
%FF = 200;     // FAST FEED RATE 
%FD = 0.300;   // FAST DISTANCE
%FZD = 0.100;  // FAST Z DISTANCE

;// MACRO UNITS
%UNITS = "G20"; // ENTER "G20" or "G21" FOR IMPERIAL OR METRIC

;///////// 
;/////|||||\\\\\

;///////////////////
;///////////////////

;// ERROR MESSAGE AND ACTION FOR UNIT CHECK
%ERROR_ACTION = "UNIT ENTRY ERROR) " + "M0";
;// CHECK MAKE SURE UNITS ARE ENTERED CORRECTLY 
%UNIT_CHECK = ((UNITS == "G20") || (UNITS == "G21")) ? "---JOGGING INITIALIZED---" : ERROR_ACTION; 

;// RUN UNIT CHECK, FOLLOWED BY ERROR POPUP MESSAGE
([UNIT_CHECK]; UNIT ENTRY ERROR

;// CREATE A GLOBAL FOR JOG WITH MACRO UNITS
%global.jog.units = UNITS;

;// INITIALIZE ARRAYS FOR JOG SETTINGS
%SLOW={}, NORMAL={}, FAST={};   

;// FUNCTION TO PUT MOTION SETTINGS INTO AN ARRAY 
;// {motion_name, x_distance, y_distance, z_distance, feed_rate}
%TA = function(motion,x,y,z,f){return {n:[motion], x:[x], y:[y], z:[z], f:[f]}};

;// SETUP SLOW JOG MOTION SETTINGS AND PUT INTO ARRAY
%SLOW.UP             = TA("SLOW.UP",            0,   0,  SZD, SF);
%SLOW.DOWN           = TA("SLOW.DOWN",          0,   0, -SZD, SF);
%SLOW.FORWARD        = TA("SLOW.FORWARD",       0,   SD,  0,  SF);
%SLOW.FORWARD_RIGHT  = TA("SLOW.FORWARD_RIGHT", SD,  SD,  0,  SF);
%SLOW.RIGHT          = TA("SLOW.RIGHT",         SD,  0,   0,  SF);
%SLOW.BACK_RIGHT     = TA("SLOW.BACK_RIGHT",    SD, -SD,  0,  SF);
%SLOW.BACK           = TA("SLOW.BACK",          0,  -SD,  0,  SF);
%SLOW.BACK_LEFT      = TA("SLOW.BACK_LEFT",    -SD, -SD,  0,  SF);
%SLOW.LEFT           = TA("SLOW.LEFT",         -SD,  0,   0,  SF);
%SLOW.FORWARD_LEFT   = TA("SLOW.FORWARD_LEFT", -SD,  SD,  0,  SF);

;// CREATE A GLOBAL OF ALL SLOW JOG VALUES
%global.jog.SLOW = SLOW;

;// SETUP NORMAL JOG MOTION SETTINGS AND PUT INTO ARRAY
%NORMAL.UP             = TA("NORMAL.UP",            0,   0,  NZD, NF);
%NORMAL.DOWN           = TA("NORMAL.DOWN",          0,   0, -NZD, NF);
%NORMAL.FORWARD        = TA("NORMAL.FORWARD",       0,   ND,  0,  NF);
%NORMAL.FORWARD_RIGHT  = TA("NORMAL.FORWARD_RIGHT", ND,  ND,  0,  NF);
%NORMAL.RIGHT          = TA("NORMAL.RIGHT",         ND,  0,   0,  NF);
%NORMAL.BACK_RIGHT     = TA("NORMAL.BACK_RIGHT",    ND, -ND,  0,  NF);
%NORMAL.BACK           = TA("NORMAL.BACK",          0,  -ND,  0,  NF);
%NORMAL.BACK_LEFT      = TA("NORMAL.BACK_LEFT",    -ND, -ND,  0,  NF);
%NORMAL.LEFT           = TA("NORMAL.LEFT",         -ND,  0,   0,  NF);
%NORMAL.FORWARD_LEFT   = TA("NORMAL.FORWARD_LEFT", -ND,  ND,  0,  NF);

;// CREATE A GLOBAL OF ALL NORMAL JOG VALUES
%global.jog.NORMAL = NORMAL;

;// SETUP FAST JOG MOTION SETTINGS AND PUT INTO ARRAY
%FAST.UP             = TA("FAST.UP",            0,   0,  FZD, FF);
%FAST.DOWN           = TA("FAST.DOWN",          0,   0, -FZD, FF);
%FAST.FORWARD        = TA("FAST.FORWARD",       0,   FD,  0,  FF);
%FAST.FORWARD_RIGHT  = TA("FAST.FORWARD_RIGHT", FD,  FD,  0,  FF);
%FAST.RIGHT          = TA("FAST.RIGHT",         FD,  0,   0,  FF);
%FAST.BACK_RIGHT     = TA("FAST.BACK_RIGHT",    FD, -FD,  0,  FF);
%FAST.BACK           = TA("FAST.BACK",          0,  -FD,  0,  FF);
%FAST.BACK_LEFT      = TA("FAST.BACK_LEFT",    -FD, -FD,  0,  FF);
%FAST.LEFT           = TA("FAST.LEFT",         -FD,  0,   0,  FF);
%FAST.FORWARD_LEFT   = TA("FAST.FORWARD_LEFT", -FD,  FD,  0,  FF);

;// CREATE A GLOBAL OF ALL FAST JOG VALUES
%global.jog.FAST = FAST;

And the second macro is the Jog Action Macro, This one needs to be copied and pasted for all thirty or however many different jog speeds and directions you’re setting up.
The only thing that needs to be changed is %MOTION with the name of the global with the target motion values, so for example
%MOTION = global.jog.FAST.FORWARD
%MOTION = global.jog.NORMAL.FORWARD_RIGHT
%MOTION = global.jog.SLOW.UP

(SLOW, NORMAL, FAST)
(UP, DOWN, FORWARD, FORWARD_RIGHT, RIGHT,
BACK_RIGHT, BACK, BACK_LEFT, LEFT, FORWARD_LEFT)

Once they are set up correctly set them as shortcuts and you don’t ever have to worry about them again.


;///////////////////////////
;///// JOGGING ACTION MACRO
;///////////////////////////

;/////|||||\\\\\
;///// MOTION DATA SELECTION

;// GET GLOBAL JOG DATA
%MOTION = global.jog.NORMAL.FORWARD_RIGHT;
;// (SLOW, NORMAL, FAST) 
;// (UP, DOWN, FORWARD, FORWARD_RIGHT, RIGHT, BACK_RIGHT, BACK, BACK_LEFT, LEFT, FORWARD_LEFT)

;//////////
;/////|||||\\\\\

;///////////////////
;///////////////////

;// GET MACRO UNITS FROM GLOBAL
%U= global.jog.units

;// EXTRACT DATA FROM GLOBAL JOG ARRAY
%N= MOTION.n; // MOTION NAME
%X= MOTION.x; // X VALUE
%Y= MOTION.y; // Y VALUE
%Z= MOTION.z; // Z VALUE
%F= MOTION.f; // FEED RATE

;// ERROR MESSAGE AND ACTION FOR UNIT CHECK
%ERROR_ACTION = "(---UNIT ENTRY ERROR---) " + "M1"
;// CHECK MACRO UNITS AND RETURN "INCH"/"MM" OR "UNIT ENTRY ERROR" WITH ALARM
%UN = (U == "G20") ? "INCH" : (U == "G21") ? "MM" : ERROR_ACTION;

;// PRINT JOG MOTION DATA TO CONSOLE, FOLLOWED BY ALARM POPUP MESSAGE FOR ENTRY OR INITIALIZATION ERROR
(JOG: [N], X:[X], Y:[Y], Z:[Z], F:[F], [UN]; ; UNIT ENTRY ERROR, SETTING MACRO MAY NEED TO BE RAN.

;// SET JOG, MEASUREMENT UNITS AND DISTANCE
%S= "$J="+ U +"G91";

;// PUT ALL JOG VARIABLES TOGETHER
%JOG = S + "X" + X + "Y" + Y + "Z" + Z + "F" + F;

;// RUN MOTION ONLY IF UNIT ENTRY IS CORRECT
%JOG_RUN = ((UN == "INCH") || (UN == "MM")) ? JOG : "(SETUP ERROR)" 

;// RUN JOG CHECK AND ACTION
[JOG_RUN];

M0/M1 program pause messages can pop up. There is some error handling, if the settings macro hasn’t been ran after starting GSender the Jog action will throw the message, and also if “G20” or G21" is not entered for units.
Hope this helps a bit better.

3 Likes

This is great - thanks so much…