Simulink PLC Coder

Code Optimization and IDE Integration

Simulink PLC Coder provides optimizations that reduce the memory size and increase the execution speed of the generated Structured Text. These optimizations include:

  • Dead-code elimination
  • Expression folding
  • For-loop fusion
  • Inline parameters
  • Signal storage reuse  
  • Subsystem reuse

Your optimization needs can change with your project’s development phase. For example, during rapid prototyping, you might place parameters in global memory for tuning or calibration; during a subsequent production build, you might generate parameters with their literal numeric values using the Inline parameters option to produce more optimized code.

Simulink PLC Coder can output Structured Text in a variety of file formats used by third-party IDEs. File formats supported by Simulink PLC Coder include:  

  • 3S-Smart Software Solutions CoDeSys
  • B&R Automation Studio™
  • Beckhoff® TwinCAT®
  • Omron Sysmac Studio
  • KW-Software MULTIPROG®
  • Phoenix Contact® PC WORX™
  • Rockwell Automation® RSLogix™ 5000
  • Siemens® SIMATIC® STEP® 7 IDE
  • IDEs that use generic ASCII files
  • PLCopen XML

To generate Structured Text, you select from the list of supported IDEs in the Simulink PLC Coder configuration parameters dialog box. The Structured Text can then be integrated and compiled using the selected IDE.

Example of optimized structured text.
Example of optimized Structured Text. Simulink PLC Coder generates optimized, well-integrated code for Simulink, Stateflow, and Embedded MATLAB functions.
Next: Code Test and Verification

Try Simulink PLC Coder

Get trial software

Control System Design Using Simulink and RSLogix 5000

View webinar