issue with macro restart

If you have a question about the software please ask it here.

issue with macro restart

Postby girogiri » Wed Aug 31, 2022 9:22 am

Hi All,

I'd like to ask support to know why this M3 macro is not working.
in particular the line that restart the G-code execution
Code: Select all
exec.Callbutton(128);

is not executed if this code is executed first
Code: Select all
if(!AS3.Getbuttonstate(ATC_SEALED_BUTTON)){
        exec.Callbutton(ATC_SEALED_BUTTON);
   while(exec.Ismacrorunning(ATC_SEALED_BUTTON) > 1 ){Thread.Sleep(20);}
 }


thanks
Giorgio
Attachments
M3.txt
(12.61 KiB) Downloaded 190 times
girogiri
 
Posts: 35
Joined: Fri Jun 19, 2020 2:50 pm

Re: issue with macro restart

Postby girogiri » Fri Sep 02, 2022 7:35 am

no replies?
attached is the "ATC_SEALED_BUTTON" macro ( aka M20044.txt) called in the IF cycle described in previous post.
It works with no issues, I'm attaching it to better understand the whole process
this is the relevant part of it:
Code: Select all
if(Convert.ToBoolean(exec.Readkey("UserCheckboxes", Convert.ToString(ENABLE_ATC_CHECKBOX), "False"))){

   if(!AS3.GetLED(ATC_LIFE_LED)){
      exec.Informplugin("Messages.dll", (object)"#Ok: Raffreddamento ATC (M20044)|ATC Offline.");
   }
   else if(!SendDataBin(ATC,1, !my_status, ATC_WRITE_SEALED_BIT)){
      exec.Informplugin("Messages.dll", (object)"#Ok: Raffreddamento ATC (M20044)|Invio comando sealed fallito.");
   }
   else{
      AS3.Switchbutton(!my_status, ATC_SEALED_BUTTON);
   }
}
else{
   exec.Informplugin("Messages.dll", (object)"Ok: Raffreddamento ATC (M20044)|ATC non abilitato.");
}


I don't see reasons why this code should block the
Code: Select all
exec.Callbutton(128);
statement


thanks
Giorgio
Attachments
M20044.txt
(7.67 KiB) Downloaded 182 times
girogiri
 
Posts: 35
Joined: Fri Jun 19, 2020 2:50 pm


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 26 guests