| Contents | Index |
This table summarizes what's new in Version 1.2.1 (R2011b):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems |
|---|---|---|
| Yes Details below | Yes | Bug
Reports Includes fixes |
New features introduced in this version are:
The Simulink PLC Coder software now generates and imports subsystem code into target IDEs without the test bench. To use this feature:
In the Configuration Parameters dialog box, clear the Generate testbench for subsystem check box.
In the Simulink editor, right-click the subsystem and select PLC Code Generation > Generate and Import Code for Subsystem.
In previous releases, the coder generated and imported test bench code into the target IDE regardless of the setting of the Generate testbench for subsystem check box.
In generated code, the function block code of the top-level subsystem has been simplified. The coder now generates the function block code depending on whether or not the top-level subsystem has internal state. In previous releases, the coder always generated the function block code with the ssMethodType parameter for top-level subsystems.
This release simplifies the function block code of the top-level subsystem for generated code.
If the top-level subsystem in the Simulink model has internal state, the generated function block for the block will have an extra first parameter ssMethodType of integer type. This extra parameter is in addition to the function block I/O parameters mapped from Simulink block I/O ports.
To use the function block:
Initialize the block by calling the function block with ssMethodType set to integer constant SS_INITIALIZE.
If the IDE does not support symbolic constants, set ssMethodType to integer value 0.
For each follow-up invocation, call the function block with ssMethodType set to constant SS_STEP.
If the IDE does not support symbolic constants, set ssMethodType to integer value 1.
These settings cause the function block to initialize or compute and return output for each time step.
If the top-level subsystem does not have internal state, the function block code has only parameters mapped from Simulink block I/O ports. There is no ssMethodType parameter. To use the function block in this case, call the function block with I/O arguments.
For non-top-level subsystems, either with or without internal state, the function block code has the ssMethodType parameter. The generated code might have other ssMethodType constants to implement Simulink semantics.
The following demo is new:
Generating Structured Text for a Simple Simulink Subsystem without Internal State — Illustrates changes for function block prototypes in generated code.
![]() | Version 1.3 (R2012a) Simulink PLC Coder | Version 1.2 (R2011a) Simulink PLC Coder | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |