Working on some runtime info..

Make your own CNC Control Apps

Moderator: cnckeith

corbin
Posts: 71
Joined: Fri Nov 08, 2024 2:57 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 3484E42757Cd-1018248693
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Working on some runtime info..

Post by corbin »

Working on a little app for runtimes. When you run a job, it will save the time it took, and show you how long is left when you run it again. It also does some basic estimates based on the line through the gcode.

I need to figure out a good way to launch it on start of CNC12.

All the code is at https://github.com/corbinstreehouse/Cen ... RackSetup/

It is still a work in progress.
Screen Recording (6-18-2025 9-12-35 PM) (2).mp4
(1.13 MiB) Downloaded 15 times


ASPeters
Posts: 46
Joined: Thu Feb 10, 2022 5:55 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Working on some runtime info..

Post by ASPeters »

Looks great!

I'd create a vcp button that launches the app, which is done on page 33 of the vcp manual - https://www.centroidcnc.com/centroid_di ... manual.pdf

You could also add to the start.bat file inside of your install directory and change your shortcut target to

Code: Select all

C:\Windows\System32\cmd.exe /C "C:\cnct\start.bat"


ShawnM
Community Expert
Posts: 3011
Joined: Fri May 24, 2019 8:34 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 7804734C6498-0401191832
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Clearwater, FL

Re: Working on some runtime info..

Post by ShawnM »

Looks great and I agree that a VCP button to launch it is a good idea. The image on the button could be a stopwatch. You really need it for those longer jobs and not necessarily on the quick ones.

The fiber laser in the shop has that feature built in and it displays it on the screen similar to your design. There's a timer and a bar graph. I'd love to see this as a standard feature in CNC12. There's a count up timer but I don't find it useful unless you remember the runtime when you graph the job. Since I suffer from CRS having it on the screen would be great. :D


corbin
Posts: 71
Joined: Fri Nov 08, 2024 2:57 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 3484E42757Cd-1018248693
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Working on some runtime info..

Post by corbin »

Yeah, I've got a few VCP buttons already launching my apps; one does a drop down for tool selection.

I was thinking I could add something to my home script.

Corbin


ASPeters
Posts: 46
Joined: Thu Feb 10, 2022 5:55 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Working on some runtime info..

Post by ASPeters »

M130 allows you to run shell commands. You may still have to write a batch script to start it up


cnckeith
Site Admin
Posts: 8924
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Working on some runtime info..

Post by cnckeith »

cool!
what happens when you use F4 Run, F2 search and choose to start somewhere in the middle of the program?
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html


corbin
Posts: 71
Joined: Fri Nov 08, 2024 2:57 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 3484E42757Cd-1018248693
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Working on some runtime info..

Post by corbin »

cnckeith wrote: Thu Jun 19, 2025 3:22 pm cool!
what happens when you use F4 Run, F2 search and choose to start somewhere in the middle of the program?
Yeah, that will fall back to the estimate, which is entirely brain-dead at just a percentage through the gcode file. Although, I don't have a good way of knowing when it starts half-way through so I may have to add some heuristics.

Ideally I'll kick up a background thread and actually simulate the runtime based on parsing the gcode machine moves. It won't be perfect, as it is hard to predict how smoothing may affect acceleration, but I should be able to get it as good as Fusion's estimates.

Corbin


corbin
Posts: 71
Joined: Fri Nov 08, 2024 2:57 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 3484E42757Cd-1018248693
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Working on some runtime info..

Post by corbin »

ASPeters wrote: Thu Jun 19, 2025 10:39 am M130 allows you to run shell commands. You may still have to write a batch script to start it up
Yeah! I realized a while back that you don't need a batch file. Stuff like this works:

<line>M130 "C:\CNCM\ToolRackSetup.exe -showToolSetupWindow"</line>

When I had a batch file you would see it flash on the screen, which is annoying.


cnckeith
Site Admin
Posts: 8924
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Working on some runtime info..

Post by cnckeith »

our g code backplot actually runs the job with accel/decel taken into account (and including smoothing if you are using G64!) it does the actual motion planning for the g code graph, not just drawing some lines. thats why CNC12's drilling job time estimates are so accurate compared to a cad/cam system's stab at it. if you set the range (F3 Set Range) in the g code backplot you will notice the run time estimate has also changed. Tip: leave the END value blank and it defaults to the end of the program using your start line number to start at and finish the rest of the job.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html


corbin
Posts: 71
Joined: Fri Nov 08, 2024 2:57 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 3484E42757Cd-1018248693
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Working on some runtime info..

Post by corbin »

cnckeith wrote: Thu Jun 19, 2025 4:45 pm our g code backplot actually runs the job with accel/decel taken into account (and including smoothing if you are using G64!) it does the actual motion planning for the g code graph, not just drawing some lines. thats why CNC12's drilling job time estimates are so accurate compared to a cad/cam system's stab at it. if you set the range (F3 Set Range) in the g code backplot you will notice the run time estimate has also changed. Tip: leave the END value blank and it defaults to the end of the program using your start line number to start at and finish the rest of the job.
Awesome! Is there any way to get that estimate from the API?


Post Reply