ATC - new approach

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

Re: ATC - new approach

Postby sebba » Thu Feb 27, 2025 8:33 am

you welcome,
If you need help with ATC settings just let me know

also, the M20101 macro is monitoring the OSSD inputs of UB1 board.
You can ignore these messages (like "E-Stop Button Activated") or comment/delete the lines 23 to 59 of this macro (from "// monitored LEDs - return different messages for OSSD inputs" line to the end of file).
.
- YQWQ
User avatar
sebba
 
Posts: 94
Joined: Mon Dec 21, 2020 9:56 am
Location: Bucharest, ROMANIA

Re: ATC - new approach

Postby hacker77 » Sun Mar 02, 2025 12:25 am

Sebba, any easy way to switch it to imperial units? Don't shoot me for asking. Everything i have is in imperial.
hacker77
 
Posts: 21
Joined: Mon Aug 22, 2022 10:38 pm

Re: ATC - new approach

Postby sebba » Sun Mar 02, 2025 7:37 am

Huh!
Really, I don't know. I have to check.
Please let me know what parts of the ATC side are affected by using it with imperial units.
Also, let me know if you use imperial units in decimal format or fractional. I never used imperial units with CNC machines, especially UCCNC
- YQWQ
User avatar
sebba
 
Posts: 94
Joined: Mon Dec 21, 2020 9:56 am
Location: Bucharest, ROMANIA

Re: ATC - new approach

Postby Daywalker » Wed Mar 05, 2025 10:05 pm

Hello Sebba,

Maybe you have a clue for me why this script doesn't work with a button.

Code: Select all
int p_output_port             = AS3.Getfieldint(20662);                                 // Magazin Pneumatic Output Port
int p_output_pin              = AS3.Getfieldint(20663);                                 // Magazin Pneumatic Output Pin
   
RunMacro(AS3.Getbuttonstate(20202));



#Events

static bool isMacroRunning = false; // Variabila globală pentru a verifica starea macro-ului


   
public void RunMacro(bool status) {
    if (!isMacroRunning) {
        isMacroRunning = true;
      
      if (!status)
      {
         AS3.Switchbutton(true, 20202);
         exec.Writekey("UserTextfields", "20202", "true");
         exec.Setoutpin(p_output_port, p_output_pin);   
      }
      else
      {
         AS3.Switchbutton(false, 20202);
         exec.Writekey("UserTextfields", "20202", "false");
         exec.Clroutpin(p_output_port, p_output_pin);   
      }

        // Resetăm starea macro-ului
        isMacroRunning = false;
    } else {
        return;
    }
}
Regards from Germany
Udo

(UC300ETH & UB1)
[Yeah, I use a Translator ;-) ]
Daywalker
 
Posts: 36
Joined: Sun Jul 29, 2018 8:11 am

Re: ATC - new approach

Postby sebba » Sun Mar 09, 2025 4:49 pm

sorry, very busy days here
I'm not able to test right now
what error do you have?
- YQWQ
User avatar
sebba
 
Posts: 94
Joined: Mon Dec 21, 2020 9:56 am
Location: Bucharest, ROMANIA

Re: ATC - new approach

Postby hacker77 » Mon Mar 10, 2025 8:35 pm

sebba wrote:Huh!
Really, I don't know. I have to check.
Please let me know what parts of the ATC side are affected by using it with imperial units.
Also, let me know if you use imperial units in decimal format or fractional. I never used imperial units with CNC machines, especially UCCNC



Hey sebba I use decimal format for my jobs. I know your busy so whenever you get a minute.
hacker77
 
Posts: 21
Joined: Mon Aug 22, 2022 10:38 pm

Re: ATC - new approach

Postby sebba » Tue Mar 11, 2025 5:25 am

I will install a new UCCNC instance, with imperial units and check it.
Can you point me to some functions which not working correctly with imperial units??
- YQWQ
User avatar
sebba
 
Posts: 94
Joined: Mon Dec 21, 2020 9:56 am
Location: Bucharest, ROMANIA

Re: ATC - new approach

Postby Daywalker » Tue Mar 11, 2025 7:52 am

sebba wrote:sorry, very busy days here
I'm not able to test right now
what error do you have?



I got the macro to work. Thanks anyway
Regards from Germany
Udo

(UC300ETH & UB1)
[Yeah, I use a Translator ;-) ]
Daywalker
 
Posts: 36
Joined: Sun Jul 29, 2018 8:11 am

Re: ATC - new approach

Postby sebba » Tue Mar 11, 2025 8:33 am

Great,
What was wrong?
- YQWQ
User avatar
sebba
 
Posts: 94
Joined: Mon Dec 21, 2020 9:56 am
Location: Bucharest, ROMANIA

Re: ATC - new approach

Postby Daywalker » Thu Mar 13, 2025 4:45 pm

Here the right Code.

The "int" Section need to move into the Macro

Code: Select all
// M20202 - Original: HTM_ATC macro - by SeB / Changed by Udo alias Daywalker
// ATC Tools -> ATC - Magazin IN/OUT Button


   
RunMacro(AS3.Getbuttonstate(20202));



#Events

static bool isMacroRunning = false; // Variabila globală pentru a verifica starea macro-ului


   
public void RunMacro(bool status) {
    if (!isMacroRunning) {
        isMacroRunning = true;
      
      int p_output_port             = AS3.Getfieldint(20662);                                 // Magazin Pneumatic Output Port
      int p_output_pin              = AS3.Getfieldint(20663);                                 // Magazin Pneumatic Output Pin
      
      if (!status)
      {
         AS3.Switchbutton(true, 20202);
         exec.Writekey("UserTextfields", "20202", "true");
         exec.Setoutpin(p_output_port, p_output_pin);   
      }
      else
      {
         AS3.Switchbutton(false, 20202);
         exec.Writekey("UserTextfields", "20202", "false");
         exec.Clroutpin(p_output_port, p_output_pin);   
      }

        // Resetăm starea macro-ului
        isMacroRunning = false;
    } else {
        return;
    }
}
Regards from Germany
Udo

(UC300ETH & UB1)
[Yeah, I use a Translator ;-) ]
Daywalker
 
Posts: 36
Joined: Sun Jul 29, 2018 8:11 am

PreviousNext

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

cron