Quantcast

Simulink PLC Coder

Working with Simulink PLC Coder

In Simulink, you can generate Structured Text using Simulink PLC Coder by right-clicking on a Subsystem block and selecting the PLC Coder > Generate Code for Subsystem option in the resulting context menu. In MATLAB, you can invoke the plcgeneratecode command, which lets you create scripts to generate Structured Text using an automated, repeatable build process.

With support for more than 130 Simulink blocks, all Stateflow constructs, and many Embedded MATLAB functions, Simulink PLC Coder can fully implement your control system models comprising feedback loops, mode and state logic, and math-intensive algorithms. You can use Simulink PLC Coder to convert discrete-time plant models into Structured Text for hardware-in-the-loop (HIL) testing. Alternatively, you can use Simulink Coder to generate C/C++ code for HIL testing with discrete-time or continuous-time models.

Generating structured text with Simulink PLC Coder.
Generating Structured Text in Simulink with Simulink PLC Coder. Right-click on a Subsystem block and select the PLC Coder > Generate Code for Subsystem option in the resulting context menu.
Next: Code Optimization and IDE Integration

Try Simulink PLC Coder

Get trial software

Control System Design Using Simulink and RSLogix 5000

View webinar