c++real-timemulticorecnc

Real-time processing with machines


I will be writing an interface in C++ that controls a large CNC machine and it will run on Windows. For safety reasons, I would like this process to run on it's own core so that it can run the process in real-time. If it shares a core with Windows, all of the Windows processes will be dealt with before my process is. Basically, how do I make sure either my process is always in the front of the processing queue, or how do I designate a core to run my process and leave the other core to handle Windows? Also, is there any way of seeing that my programming is run in real-time. AKA, this core is processing this program, but that core is not doing anything because we told out program not to run on it. Any input would be helpful.


Solution

  • There is no guarantee your process will be dealt with in real time. Windows does not do that. Since you mention safety, I will mention that if a lawsuit occurred you would be in deep trouble. Expert witnesses would testify that the design is inherently unsafe.

    User control and display can be done in Windows but real time operations belong in dedicated hardware such as a PLC.