The jogging is disabled while a macro is running. It's normal: your macro may run g-codes and jogging while a g-code is running would be interesting. If you want to do everything in one macro then, I think, the best way is to have that main macro with all the code in it and the different buttons that call this macro with a parameter showing wich button was pressed. E.g.:
Button 20000, M20000.txt: exec.Code("M20100 Q1");
Button 20001, M20001.txt: exec.Code("M20100 Q2");
Button 20002, M20002.txt: exec.Code("M20100 Q3");
M20100.txt:
- Code: Select all
int Qint;
if (Qvar == null)
{
return;
}
Qint = Convert.ToInt32(Qvar);
switch (Qint)
{
case 1:
// code for 1st button
break;
case 2:
// code for 2nd button
break;
case 3:
// code for 3rd button
break;
}
#Events
static int myIntVar;
static double myDoubleVar;
(See
this post about why to use statics. You don't need to precompile the macros.)