0

I worked on Sinumerik CNC systems. Those systems have a postion control cycle. Typical control cycle for Sinumerik CNC is 250us. CNC task runs on Linux NCU controller and to carry on other tasks there is a PLC.

Now I am working on Codesys RTE Softmotion CNC project. System works on Windows 10 Intel-i5 processor Industrial PC which has 1.6GHz base frequency.

Problem here, all CNC and logic tasks works on same controller and once we proceed on the project, it is getting heavy and it affects ethercat task cycle time which runs the CNC axis servos and without completing half of the coding cycle time already reached 350us.

That means cycle time of the RTE already exceeded the cycle time of Sinumerik CNC system.

I am not sure cycle time will reduce under 250us once we finish the project even we get more powerful CPU.

What could be the possible solution? Better hardware or incorrect Windows/Bios settings or poor code optimization.

Esat Genç
  • 113
  • 3
  • It is difficult to answer your question. I can tell you that I achieve 250us cycle times at 20% CPU load on a mid/low-end Beckhoff PC, for a project with thousands of function blocks, tens of thousands of "tags" (most of which are exposed over OPC-UA). No CNC however. This does not mean you have avoidable bottlenecks with your hardware, software or code, but it is worth exploring, for instance by trying the same code with a different hardware/software combo, and trying to deactivate parts of your code to see what is using the most resources. – Fred Aug 18 '23 at 18:40

1 Answers1

0

You should try using a profiler (here's a webinar on CODESYS Profiler). A profiler will tell you how much of the execution time each function took, and how many times it was called. Find the parts of your code that are the heaviest, and then determine if and how you can optimize them. If you believe optimizations are impossible, then better hardware is needed.

Guiorgy
  • 1,405
  • 9
  • 26