Update: Performance Fix – Solving Simulation Lag in NX MCD
Update: Performance Fix – Solving Simulation Lag in NX MCD
After previously reporting severe slowdowns and desynchronization during real-time simulations in my digital twin of the Festo MPS, I’m happy to share that I’ve implemented a solution that significantly improved system stability and performance.
As discussed in my last post, Siemens NX MCD’s real-time simulation performance degraded rapidly after a few minutes. The culprit? A high volume of simultaneous collision checks. The issue wasn’t just the number of components—it was the persistence of physical bodies (completed workpieces) staying in the simulation environment far longer than necessary.
To address this, I introduced an automated object removal routine. Here’s how it works:
Each sorting bin (Slide 1 and Slide 2) was equipped with an Object Sink, configured to remove collected workpieces after classification.
I added a "Collect Order" feature that triggers the sinks automatically once a bin reaches a predefined threshold or when a workpiece enters.
Rejected or incomplete parts sent to the dismantling station are now also actively recycled using a dual-stage suction mechanism. Once identified, these parts are physically moved to recycling bins and removed from the simulation.
This significantly reduces the number of active rigid bodies and collision interactions in the scene.
After implementing the object sinks and active recycling:
The simulation runtime was doubled before any noticeable slowdown occurred.
Collision-related glitches (such as jittering or misaligned parts) were eliminated.
CPU core utilisation remained more consistent and under the threshold, thanks to fewer persistent collision zones.
Digital twins are beneficial, but real-time physics engines still limit their capabilities. NX MCD is particularly sensitive to collision loads due to its single-threaded simulation architecture. By removing "dead" objects regularly—especially those no longer needed in the process—I effectively reduced physics overhead and data clutter.
This fix was a reminder that realism in simulation must be managed, not just created. Leaving hundreds of workpieces on the scene, even if they are stationary, means that every one of them continues to consume CPU resources through background collision checks.
With stability improved, I’m now looking at:
Testing longer simulation cycles.
Exploring Node-RED integration (based on OPC UA data).