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.

Aspire Direct Output to UCCNC

Postby RsX » Wed Oct 30, 2024 12:33 pm

Hello,
this is my solution to enable the Aspire direct output function for UCCNC
Let me know if it works for you too and if it can be improved :)

aspire direct output.png
aspire direct output.png (21.74 KiB) Viewed 429 times

To enable the direct output I added this line into a copy of the UCCNC original postprocessor
The first part is just a name, the second is the ini file that contains the command to execute
Code: Select all
DIRECT_OUTPUT = "UCCNC|UCCNC_run.ini"


Then I put this command into the ini file
What it does is creating a UCCNC subfolder in the temp folder and moves the gcode (%s) into it with a fixed name.
Code: Select all
cmd
/c mkdir "%%TEMP%%\UCCNC\" & move /y %s "%%TEMP%%\UCCNC\Autoload.gcode"


Both files are in the attached zip file and go into this folder, where V is the version of Aspire
Code: Select all
C:\ProgramData\Vectric\Aspire\{Vx.x}\My_PostP


macroloop.png

To make UCCNC load the file I created an M20002 macro and setup a macroloop that starts with UCCNC
The macro continuously checks if there is an Autoload.gcode file in the specified folder and, if UCCNC is stopped, loads it then removes it.
Code: Select all
string AutoloadFile = Environment.GetEnvironmentVariable("TEMP") + @"\UCCNC\Autoload.gcode";
//MessageBox.Show(AutoloadFile);
if(exec.CycleStopped && System.IO.File.Exists(AutoloadFile)){
   exec.Loadfile(AutoloadFile);
   while(exec.IsLoading()){}
   System.IO.File.Delete(AutoloadFile);
}
Attachments
M20002.txt
(290 Bytes) Downloaded 25 times
UCCNC postprocessor.zip
(1.43 KiB) Downloaded 21 times
User avatar
RsX
 
Posts: 16
Joined: Fri Oct 25, 2024 9:22 pm

Re: Aspire Direct Output to UCCNC

Postby sebba » Wed Oct 30, 2024 4:34 pm

Nice job, I'll try it right after I'll finish my current upgrade.
Thanks for posting
- YQWQ
User avatar
sebba
 
Posts: 43
Joined: Mon Dec 21, 2020 9:56 am
Location: Bucharest, ROMANIA

Re: Aspire Direct Output to UCCNC

Postby sebba » Sun Nov 03, 2024 1:06 pm

regarding M20002 macro, uccnc and aspire have to be installed on the same computer?
what about if aspire run on different computer?
- YQWQ
User avatar
sebba
 
Posts: 43
Joined: Mon Dec 21, 2020 9:56 am
Location: Bucharest, ROMANIA

Re: Aspire Direct Output to UCCNC

Postby RsX » Sun Nov 03, 2024 1:37 pm

No, they don't, but they must have access to the same network folder/disk.
You can modify the Aspire command to move the %s file to the shared folder and the UCCNC macro to monitor that folder.
Maybe this might even work with a onedrive/googledrive synced folder or the direct output can be modified to send the file via ftp... The possibilities are endless
What would you like to use to send the file to the other computer? Maybe I can help
User avatar
RsX
 
Posts: 16
Joined: Fri Oct 25, 2024 9:22 pm

Re: Aspire Direct Output to UCCNC

Postby sebba » Sun Nov 03, 2024 5:22 pm

Understand, thanks.
I'll let you know when I'll test it in real life.
For now it was just a preview, having a break with my current task.
Thank you,
Seb
- YQWQ
User avatar
sebba
 
Posts: 43
Joined: Mon Dec 21, 2020 9:56 am
Location: Bucharest, ROMANIA


Return to Macros

Who is online

Users browsing this forum: No registered users and 1 guest