API for real-time control during machining process

Make your own CNC Control Apps

Moderator: cnckeith

Post Reply
eastonhy
Posts: 1
Joined: Sun Feb 09, 2025 11:37 am
Acorn CNC Controller: No
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: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

API for real-time control during machining process

Post by eastonhy »

Hello there. I am keen to explore the feasibility of dynamically controlling machining parameters—such as spindle speed, depth of cut, and more—using a programming language like Python or C during the machining process. By this way, I can monitor the machining quality and improve it by adjust the parameters during the machining process in real-time.

While I understand that many CNC machines allow manual parameter adjustments via controller boards, I am particularly interested in achieving this level of control programmatically through python or C scripting.

If there are existing APIs that facilitate such integration, I would greatly appreciate any recommendations. Additionally, I am curious about the possibility of developing a custom API for this purpose if none currently exist. I would be grateful for any insights, suggestions, or guidance on how to approach this. Thank you in advance! :D


ASPeters
Posts: 39
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: API for real-time control during machining process

Post by ASPeters »

eastonhy wrote: Sun Feb 09, 2025 11:55 am Hello there. I am keen to explore the feasibility of dynamically controlling machining parameters—such as spindle speed, depth of cut, and more—using a programming language like Python or C during the machining process. By this way, I can monitor the machining quality and improve it by adjust the parameters during the machining process in real-time.

While I understand that many CNC machines allow manual parameter adjustments via controller boards, I am particularly interested in achieving this level of control programmatically through python or C scripting.

If there are existing APIs that facilitate such integration, I would greatly appreciate any recommendations. Additionally, I am curious about the possibility of developing a custom API for this purpose if none currently exist. I would be grateful for any insights, suggestions, or guidance on how to approach this. Thank you in advance! :D
The Centroid API (CentroidAPI.dll in your install directory) only supports .NET applications (C# or Visual Basic).
One user has gone through the trouble of making a python version of this api here: https://github.com/fca1/cnc_centroid_skinning
To my knowledge, no one has made a C/C++ version.

API documentation can be found here: https://www.centroidcnc.com/cnc_app_api.html

Adjusting some parameters mid-job is possible though for safety reasons, a lot of calls only work when the machine is idle. I believe items like depth of cut and spindle speed can only be altered in the g-code job.


Post Reply