Post by Camille Martin
Senior PLC Engineer
š Open-sourcing ruckig-scl ā jerk-limited online trajectory generation, now running natively on a Siemens PLC. Ā Smooth motion isn't just about getting from A to B. The moment you care about machine wear, settling time, orĀ tracking a moving target, you need trajectories with controlled acceleration and jerk ā not the trapezoidal ramps most PLC motion still relies on. Ā In robotics, this problem is largely solved. Ruckig (MIT) has become the de-facto open-source reference forĀ real-time, jerk-limited Online Trajectory Generation ā used across the ROS ecosystem and by industrial robotics OEMs. Ā But there's a gap: none of it runs on a PLC. And the PLC is exactly where a lot of real industrial motion lives āĀ the deterministic, cyclic, IEC 61131 architecture that drives the machine. Ā So I am porting Ruckig's algorithms to Siemens SCL (Structured Text) for the S7-1500 ā MIT-licensed, same as upstream. Ā š https://lnkd.in/eXxj7cDH Ā The hard part wasn't the math ā it was the language. SCL has no templates, no std::optional, no exceptions, static array sizing only, and a very different idea of what "a function" is. A line-by-line translation was never going to work. Ā The methodology is where it got interesting. Rather than eyeballing C++ against ST, I built the port onĀ siemens-plc-tools (also open-sourced) ā an engine that transpiles the actual SCL block source to Python. That means every block runs in an automated test harness and is validated cycle-by-cycle against the real Ruckig solver as a numerical oracle: Ā ā single-axis solver matches to the floating-point floor (~1e-15) Ā ā full cyclic trajectories match to 1e-6 Ā ā ~200 tests + 36 parity scenarios, version by version, test-first Ā Current status: multi-axis time / phase / per-DoF synchronization, arbitrary initial & target states, discrete duration rounding. Velocity interface and brake profiles are next on the roadmap. Ā If you do motion on Siemens PLCs ā or you just like seeing robotics-grade algorithms cross into the automation world ā I'd love your feedback, issues, and stars. ā Ā š ruckig-scl: https://lnkd.in/eXxj7cDH Ā š siemens-plc-tools: https://lnkd.in/e4sss-CR Ā š upstream Ruckig: https://lnkd.in/eRDdgWCi Ā #PLC #Siemens #TIAPortal #Automation #IndustrialAutomation #MotionControl #Robotics #OpenSource #SCL #IEC61131 Ā #S71500 #TrajectoryGeneration