Model-Based Design for Industrial PLC Development: A Simulink-to-TwinCAT Workflow for Real-Time Systems
Model-based design (MBD) using MATLAB/Simulink has seen wide adoption inaerospace and automotive domains, yet its application to IEC 61131-3 programmablelogic controller (PLC) development remains underexplored in the literature. This paperpresents a structured workflow for developing real-time control software for industrialPLC targets using Simulink and the TwinCAT TE1400 automatic code generationtoolchain. We describe key model architecture decisions including hierarchical busobject design, Stateflow-based supervisory state machine development, and codegeneration configuration for the TwinCAT GRT target. Integration of the generatedTcCOM module within TwinCAT 3 XAE and validation using simulation and ExternalMode are discussed. Lessons learned from an industrial deployment are presented,covering temporal logic interpretation, observability challenges, and workflow boundarydiscipline. The methodology demonstrates that MBD reduces manual coding effort,improves traceability between specification and implementation, and enablessystematic regression testing -- benefits directly applicable to safety-critical hardreal-time industrial control systems. Real-time performance characterization confirmsdeterministic 1 ms cycle execution with measured execution times well within budget,validating the approach for hard real-time industrial control applications.
Authors
- Rohini Ramegowda (ORCID: https://orcid.org/0009-0005-4405-2173)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-05-12
- DOI
- https://doi.org/10.5281/zenodo.20143184
- Primary Topic
- Real-Time Systems Scheduling
- Type
- preprint