Simulink PLC Coder™ generates hardware-independent IEC 61131-3 Structured Text and Ladder Diagrams from Simulink® models, Stateflow® charts, and MATLAB® functions. Structured Text is generated in PLCopen XML and other file formats supported by widely used integrated development environments (IDEs), including 3S-Smart Software Solutions CODESYS®, Rockwell Automation Studio 5000, Siemens TIA Portal, and Omron® Sysmac® Studio. Ladder diagrams are generated in file formats supported by Rockwell Automation Studio 5000. As a result, you can compile and deploy your application to numerous programmable logic controller (PLC) and programmable automation controller (PAC) devices.
Simulink PLC Coder generates test benches that help you verify the Structured Text and Ladder Diagrams using PLC and PAC IDEs and simulation tools. It also provides code generation reports with static code metrics and bidirectional traceability between model and code. Support for industry standards is available through IEC Certification Kit (for IEC 61508 and IEC 61511).
Get Started:
Support for Third-Party IDEs
Simulink PLC Coder generates Structured Text in a variety of file formats used by third-party IDEs, including Siemens® STEP 7/TIA Portal, Rockwell Automation® Studio 5000, 3S CODESYS®, and PLCopen XML. Simulink PLC Coder also generates Ladder Diagrams for Rockwell Automation Studio 5000.
Generate Structured Text
With support for more than 180 Simulink blocks, all Stateflow constructs, and many MATLAB functions, Simulink PLC Coder generates Structured Text from your control system models comprising feedback loops, mode and state logic, and math-intensive algorithms.
Import and Generate Ladder Diagrams
Import Rockwell Automation Studio 5000 Ladder Diagrams into Simulink for simulation and verification. Generate Ladder Diagrams from Simulink models for Studio 5000. Validate generated Ladder Diagrams by generating and executing the test bench running on the IDE’s emulator.
Code Optimization
Simulink PLC Coder applies optimizations by default to reduce memory size and increase execution speed of the generated Structured Text and Ladder Diagrams. These optimizations include dead-code elimination, expression folding, and subsystem reuse.
Commenting, Bidirectional Tracing, and Documenting Code
Comments, user-specified block descriptions, and bidirectional links enable you to navigate and trace between Simulink model components and the generated code. The code generation report consolidates all information for code reviews and debugging.
Code Test and Verification
Generate a test bench to verify Simulink simulation results match results in PLC within an acceptable tolerance. Run hardware-in-the-loop testing in real time using Simulink PLC Coder together with Simulink Coder™, Simulink Real-Time™, and a Speedgoat target computer.