Aspire Direct Output to UCCNC

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

Re: Aspire Direct Output to UCCNC

Postby Greolt » Sat Mar 22, 2025 12:45 am

I see in Robert Spark's excellent macro guide that there is a "Loadfile" command but nothing I can see to "Closefile"

exec.Callbutton(512); may work but I will have wait till I get back home to try it out.
Greolt
 
Posts: 254
Joined: Sun Sep 04, 2016 6:22 am

Re: Aspire Direct Output to UCCNC

Postby Greolt » Sat Mar 22, 2025 6:13 am

I have tried everything that I can think of. In trial mode. I am away from the machine.

If the already loaded gcode has been run then the direct output does not work.

After the second gcode has failed to load, if I then press either "reset" or "cycle stop" the second gcode will suddenly appear.

So I made many amateurish attempts to include something into the macro that would do that, but failed miserably.

EDIT: In the post above I meant to write exec.Callbutton(125);
Greolt
 
Posts: 254
Joined: Sun Sep 04, 2016 6:22 am

Re: Aspire Direct Output to UCCNC

Postby Greolt » Sat Mar 22, 2025 10:22 pm

After a lot of trial and error it looks like I found a workaround.

At the end of my code I replaced M30 (program end and rewind) with a macro containing the following

exec.Callbutton(130); //Cycle stop
exec.Callbutton(127); //Rewind file

This in theory does the same thing as M30 but somehow the Direct Output now works.

Still in demo mode though. Yet to see it work at the machine.
Greolt
 
Posts: 254
Joined: Sun Sep 04, 2016 6:22 am

Re: Aspire Direct Output to UCCNC

Postby Greolt » Sun Mar 30, 2025 3:38 am

Back at the machine and behaviour is exactly the same as in demo mode.

I am definitely no programmer but it seems to me that UCCNC is not clearing some sort of internal flag when executing an M30.
Greolt
 
Posts: 254
Joined: Sun Sep 04, 2016 6:22 am

Re: Aspire Direct Output to UCCNC

Postby cncdrive » Sun Mar 30, 2025 11:51 pm

Loading a file does not depends on if the g-code file was rewind or not, the software should load the new file wit hthe exec.loadfile even if an M30 was not executed.
cncdrive
Site Admin
 
Posts: 5115
Joined: Tue Aug 12, 2014 11:17 pm

Re: Aspire Direct Output to UCCNC

Postby Greolt » Mon Mar 31, 2025 12:28 am

As I said I am no programmer.

However the new gcode does not load if the previous gcode has been run and it ended with a G30.
Strangely it will appear if either Cycle Stop or Reset is pressed.

If the previous gcode ended with the macro containing the following then the new gcode loads.

exec.Callbutton(130); //Cycle stop
exec.Callbutton(127); //Rewind file

I tried leaving off both the G30 and my macro. The result was the same. The new gcode fails to load.
Greolt
 
Posts: 254
Joined: Sun Sep 04, 2016 6:22 am

Re: Aspire Direct Output to UCCNC

Postby ger21 » Mon Mar 31, 2025 4:02 pm

G30, or M30?

Try ending your code with M30.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2765
Joined: Sat Sep 03, 2016 2:17 am

Previous

Return to Macros

Who is online

Users browsing this forum: No registered users and 1 guest