Macro help

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Macro help

Postby b57378 » Tue May 10, 2022 5:39 pm

Hi All hope everyone is doing great.

Currently I am running an atc system with various inputs (tool clamp, tool pullstud sensor).

My macro simply uses an" if (signal not present) stop here" code.

Since the time until the machine gets these signals can vary depending on air pressure, I would like the macro to wait for these signals and time out after a set amount of milliseconds

I'm wondering if anyone could share with me a piece of code that could do the above?

Thanks in advance for the help!
b57378
 
Posts: 53
Joined: Wed Oct 14, 2020 9:03 pm

Re: Macro help

Postby cncdrive » Tue May 10, 2022 6:01 pm

There is the M66 macro which could do this, it is a built in macro in the UCCNC.
For the programming syntax please check the UCCNC users manual.
cncdrive
Site Admin
 
Posts: 4909
Joined: Tue Aug 12, 2014 11:17 pm

Re: Macro help

Postby b57378 » Tue May 10, 2022 6:05 pm

Thanks very much - I've seen some example code using m66 so I'll give that a try.
b57378
 
Posts: 53
Joined: Wed Oct 14, 2020 9:03 pm

Re: Macro help

Postby b57378 » Tue May 10, 2022 6:16 pm

Can it be called from within say an M6 macro?

M66 P#E#L#Q#
b57378
 
Posts: 53
Joined: Wed Oct 14, 2020 9:03 pm

Re: Macro help

Postby cncdrive » Tue May 10, 2022 7:17 pm

Yes, you can do it with the exec.Code("M66....");
cncdrive
Site Admin
 
Posts: 4909
Joined: Tue Aug 12, 2014 11:17 pm

Re: Macro help

Postby b57378 » Wed May 11, 2022 4:41 am

Thank you, this is exactly what I was looking for.
b57378
 
Posts: 53
Joined: Wed Oct 14, 2020 9:03 pm


Return to Macros

Who is online

Users browsing this forum: No registered users and 2 guests