|On this page…|
The Simulink® PLC Coder™ software does not support the following Simulink semantics:
Complex data types
Global data store memory (DSM)
Absolute time temporal logic in Stateflow® charts. Absolute time temporal logic is supported for only the Rockwell Automation® RSLogix™ 5000 IDE. For more information see Integrate Absolute Time Temporal Logic Code.
Stateflow machine-parented data and events
Exported graphical functions in Stateflow charts
Limited support for math functions. The coder does not support the following functions: tanh, cosh, sinh, rand.
Signal and state storage classes
Virtual buses at the input ports of the top-level Atomic Subsystem block.
For Each Subsystem block
Nonfinite data, for example NaN or Inf.
Simulink PLC Coder software supports the fixed-point data type. To generate code for fixed-point data types, configure block and model parameters as described in this topic.
Note: If you do not configure the blocks and models as directed, the generated Structured Text might:
Properly configure block parameters:
If the block in the subsystem has a Signal Attributes tab, navigate to that tab.
For the Integer rounding mode parameter, select Round.
Clear the Saturate on integer overflow check box.
For the Output data type parameter, select a fixed-point data type.
Click the Data Type Assistant button.
For the Word length parameter, enter 8, 16, or 32.
For the Mode parameter, select Fixed point.
For the Scaling parameter, select Binary point.
Be sure to edit the model configuration parameters (see Model Configuration Parameters).
Properly configure model configuration parameters:
In model Configuration Parameters dialog box, click the Hardware Implementation node.
For the Device vendor parameter, select Generic.
For the Device type, select Custom.
For the Signed integer division rounds to, select Zero.
For the Number of bits, set char to 16.
The Structured Text language has inherent restrictions. As a result, the Simulink PLC Coder software has the following restrictions:
The Simulink PLC Coder software supports code generation only for atomic subsystems.
The Simulink PLC Coder software supports automatic, inline, or reusable function packaging for code generation. Nonreusable function packaging is not supported.
No blocks that require continuous time semantics. This restriction includes continuous integrators, zero-crossing blocks, physical modeling blocks, and so on.
No pointer data types.
No recursion (including recursive events).