jog speed change with macro and hotkey

Post anything you want to discuss with others about the software.

jog speed change with macro and hotkey

Postby neptunier » Tue Jan 01, 2019 2:59 pm

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
neptunier
 
Posts: 34
Joined: Sun Dec 09, 2018 4:03 pm

Re: jog speed change with macro and hotkey

Postby ger21 » Tue Jan 01, 2019 3:14 pm

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);
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: jog speed change with macro and hotkey

Postby neptunier » Thu Jan 03, 2019 5:58 pm

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
neptunier
 
Posts: 34
Joined: Sun Dec 09, 2018 4:03 pm


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 17 guests