cncdrive wrote:I think it probably does not work because you placed it into M9998 , but the startup macro number is M99998,
so you have to place to the M99998.txt macro file instead.
You can check if the UCCNC is compiling the macro simply with placing a syntax error into the macro, just write some random text into the file and then you will get a M99998 macro cannot run etc. message on the UCCNC startup.
It was placed into the M99998.txt file , if I put the code as you supplied I get systax error .
If I put
// Set Jog Rate
string jogpercent = "52";
AS3jog.Setfieldtext(jogpercent, 913);
AS3jog.Validatefield(913);
I find it troubling that the developer of uccnc cant supply the correct code to do this ? but relied on chat gtp ?????????????
That works but if I put the supplied code in it just has syntax errors
// Set Jog Rate to 50%
exec.Setfield(50, 225); // 225 = Jog Rate field in UCCNC
// Enable Continuous Jog Mode
exec.Setfield(1, 226); // 226 = Continuous jog mode enable field
// Clear Reset before setting feedrate
exec.ClearReset();
// Set Feedrate to 1000 mm/min
exec.Code("F1000");
// Show pop-up message asking to home the system
int response = exec.Question("Do you want to home the system?", "Homing Confirmation");
// If the user selects "Yes", trigger the homing button
if (response == 1)
{
exec.ButtonExecute(105); // 105 = "Home all" button in UCCNC
}
I have tried Chatgtp and it gives me a dozen options but none work as it doesnt really understand uccnc any more than I do - it understands c+ but it needs to understand ucccnc properly but it does not.