In R13SP1, there were two issues pertaining to the use of the Real-Time Workshop S-function target in another model:
When used in a model accelerated with the Simulink Accelerator, the S-function makefile located at
pwd/model_sfcn_rtw/model.mkneeded to be present.Symbol collisions could occur when multiple S-functions existed in a model.
These issues have been corrected in R13SP2.
Prior to R13SP2, Real-Time Workshop generated incorrect code if either of the following conditions existed:
A Ground block that had a nonscalar output signal fed a reusable Subsystem block.
Some nonscalar input ports of a Subsystem block were not connected, either directly or indirectly, to actual (nonvirtual) signals.
In R13SP2, Real-Time Workshop reports an error if one of these conditions exists.
To correct the condition, make the following changes as they apply to your model:
Set the Subsystem block's RTW system code option to
InlineorFunction.Replace the Ground block with a Constant block that has a value that specifies a vector of zeros.
Connect unconnected input ports of the Subsystem block to Constant blocks that have a value that specifies a vector of zeros.
In R13SP1, if you selected the Inline invariant signals option on the Optimization pane of the Configuration Parameters dialog, Real-Time Workshop could generate code that produced incorrect results for models that included reusable subsystems. This condition was corrected in R13SP2 by deactivating the Inline invariant signals option, even though it still appears in the Configuration Parameters dialog.
In R13SP1, the variables representing the start and end of a dead zone in generated code for a Dead Zone block were labeled incorrectly. This is fixed in R13SP2.
In R13SP1, for Real-Time Workshop to generate code for an S-function used in a model, the S-function and its generated code needed to be in the current working directory. This requirement has been modified for R13SP2 such that Real-Time Workshop will generate code for an S-function if the S-function is on the MATLAB path. Also note that the code directory for a generated S-function and MEX file need to live in the same directory, which is how the code is generated by default.
In R13SP1, if a system in a model was reused during code generation, and that system had any inputs that were muxed, Real-Time Workshop could generate incorrect code. This could happen if other seemingly identical systems have muxed inputs that have the same overall width, but are broken down into different regions. For example if a muxed input signal has a width of 4 for two systems, but in one system the signal is broken down as[1 1 2]and in another, seemingly identical system, the signal is broken down as[1 2 1], the systems could generate incorrect code. This is fixed in R13SP2.
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |