Model Architecture and Design
When developing Simulink models for generating structured text or ladder logic code, consider:
Blocks and libraries for which code generation is supported. For a list of Simulink blocks supported for PLC code generation, see Simulink Block List (PLC Code Generation).
Setting up a model for fixed point data type code generation.
Setting up a multirate model for code generation.
Setting up a MATLAB Function for code generation.
Existing limitations when using Simulink PLC Coder to generate either structured text or ladder logic code.
Model Settings
Topics
Structured Text Code Generation Guidelines and Limitations
- Prepare Model for Structured Text Generation
Guidelines for setting up model and subsystem block parameters for Simulink PLC Coder structured text code generation. - Fixed Point Simulink PLC Coder Structured Text Code Generation
Configure model parameters and subsystem block parameters containing a fixed point data type for Simulink PLC Coder code generation. - Generating Simulink PLC Coder Structured Text Code for Multirate Models
Guidelines for setting up model and subsystem block configuration parameters for a multirate model Simulink PLC Coder code generation. - MATLAB Function Block Simulink PLC Coder Structured Text Code Generation
Describes support for, and limitations on, use of MATLAB Function block in Simulink PLC Coder code generation. - Structured Text Code Generation Limitations
Limitations that apply to structured text code generation. - Considerations for Nonintrinsic Math Functions
Range considerations for nonintrinsic math functions. - Create Custom Target-Based Keyword List
Create a custom keyword list and use it to generate code that meets the requirements of the target IDE. - PLC Model Advisor Checks
Overview of the PLC Model advisor, what the various checks are, and where to find information pertaining to the checks. - PLC Block Properties
PLC code generation parameters for specific block implementations.
Code Reuse
- Control Code Partitions for MATLAB Functions in Stateflow Charts
Choose whether the MATLAB® function is inlined in generated Structured Text code or appears as a reusable function. - Control Code Partitions for Subsystem Block
Choose whether a Subsystem block is inlined in generated Structured Text code or appears as a reusable function.
Ladder Logic Code Generation Guidelines and Limitations
- Ladder Logic Code Generation Limitations
Limitations that apply to ladder logic code generation.
Motion Instruction Simulation and Code Generation
- Simulation and Code Generation of Motion Instructions
Create model for simulation and code generation of motion instructions in the Rockwell Automation® RSLogix™ 5000 IDE.