Page 1 of 1

jog speed change with macro and hotkey

PostPosted: Tue Jan 01, 2019 2:59 pm
by neptunier
hi,
in mach3 i had a macro which would set the jog speed to 2% or 100%. the macro would see how the jog speed is and change it to the other setting, for example if the jog speed is set to 2% the hotkey or button press would change it to 100% and vice versa. that is very handy.
is there a way to do that in uccnc? the functions with the hotkey only allow to increase/decrease the jog rate one step at a time.
thanks,
michael

Re: jog speed change with macro and hotkey

PostPosted: Tue Jan 01, 2019 3:14 pm
by ger21
Basically the same way you did it in Mach3.
Write a macro to do what you want, and assign a Hotkey to it.
Something like this:

Code: Select all
double currentval = AS3jog.Getfielddouble(913);

if (currentval == 2)
   {
   newval = 100;
   }
   
else if (currentval == 100)
   {
   newval = 2;
   }


AS3jog.Setfield(newval, 913);
AS3jog.Validatefield(913);

Re: jog speed change with macro and hotkey

PostPosted: Thu Jan 03, 2019 5:58 pm
by neptunier
thanks gerry,
now it works. to assign it to a function in uccnc i had to name it m20000.txt, put it in the macro folder and then i can use the function 20000 to execute that macro.

michael