If you attempt to close a model while Real-Time Workshop is generating code or the code is beig compiled, unpredictable things may happen, up to and including segmentation violations.The MathWorks plans to addres this issue in a future release, but when using the current release and all prior releases, please do not close a model while a build is in process.
Page 9 of the shipped version of Real-Time Workshop 5.0 Release Notes indicates that in generated code,model_private.his sub- included bymodel.h. This is incorrect;model.hdoes not includemodel_private.h.The section "Application Modules for Application Components" on page 7- 33 of the Program Architecture chapter of the Real-Time Workshop documentation also incorrectly states that
model_private.his sub-included bymodel.h.On page 2-9 of “Getting Started with Real-Time Workshop” the section “Building an Application: Summary of Files Created by the Build Procedure” also incorrectly states that
model.hincludesmodel_private.h. The diagram of file inclusions in Figure 2- 12 on page 2-50 is correct, however.
When code is generated for the Look-Up Table 2-D or Look-Up Table 1-D block for floating-point parameters with binary search, extrapolation, and linear interpolation selected, the number and position of repeated zeros is generated explicitly into the generated code. If the breakpoint parameters are then tuned in the real-time code during execution and the number or position of repeated zeros changes, the generated code will in most cases get an incorrect answer when the input for that breakpoint set is near zero.The workaround is to not change the number or position of reapated zeros in breakpoint parameters for the Look-Up Table 1-D and Look-Up Table 2-D blocks.
If the Target Language Compiler exhausts available memory, causes MATLAB to hang or crash.
Simulink does not allow you to break library links in a configurable subsystem because Simulink needs the links to reconfigure the subsystem when you choose a new configuration. Breaking links would be useful only if you never intended to reconfigure the subsystem, in which case you could simply replace the configurable subsystem with a nonconfigurable subsystem that implements the permanent configuration.
Changing the number of an input or output port number in a subsystem can cause an extra port to be added to the subsystem block in the parent system.To fix the problem:
- Copy the contents of the subsystem to the clipboard.
- Delete the old subsystem block.
- Create a new subsystem block in its place.
- Copy the contents from the clipboard to the subsystem.
- Reconnect the subsystem.
In simulation, the Deadzone block outputs NaN when input is NaN, whereas it outputs 0 in Real-Time Workshop code generation. This bug is planned to be fixed in a future release.
If you change the contents of a subsystem in a library and then disable a link to the changed subsystem while the library is still open, Simulink does not copy the changes from the library to the model containing the disabled link. Release 14 fixes the problem.
The trigger port of a function-call subsystem can specifyreset states on enablefor its States when enabling parameter only if its initiator issues an explicit enable. Suppose a function-call subsystem's trigger port specifiesresetfor its States when enabling parameter. That setting is only guaranteed to be honored if the s-function serving as the initiator of the function-call subsystem explicitly issues enable and disable events. Ifresetis specified and the s-function does not explicitly issue events, and error will be reported in Release 14.A way to correct the model is to choose
inheritorheldas the setting of the trigger port's States when enabling parameter. Another way is to update the S-function as described in the documentation. Function Call Generator and Stateflow blocks do explicitly issue events, so this note does not apply to them.
The Blocksets submenu sometimes fails to appear when selected from the model window's Help menu. If this happens, click anywhere in the model window and then select "Blocksets" from the Help menu.
This release fails to report an error for an unsupported combination of settings for this block: you cannot set the interpolation method to benone-flatand the extrapolation method to belinear. This combination of settings causes a code generation failure.
The first time you save a new model that hasPostSaveFcnfunctions, thePostSaveFcnfunctions cannot find the model.
The Repeating Sequence block generates different numbers on Windows than on Linux. The differences are slight: on the order of 1e-16. However, the differences can be significant when simulation results depend on comparing the generated sequence, e.g., to zero.A workaround is to quantize the output of the Repeating Sequence block so that values near 0 become zero. For example, you could put a Dead Zone block with zone [0...1e-15] between the Repeating Sequence block and the block performing the comparison.
On Linux, the Saturation block outputsNaNif its input isNaN; on Windows, the block outputs its lower limit if its input isNaN.
The S-function Builder block causes MATLAB to hang if the compiler options file is not set up correctly.To avoid this problem, type the following at MATLAB command prompt to configure the compiler options file:
mex -setup
In this release, using a set_param command to set a parameter
of a Data Store Read/Write block or Goto/From block sets the parameter
only if the block's dialog box has not been previously opened in the
session.
When discretizing a model in the S domain, you cannot specify a sample time of 0 if the model contains a Transfer Function, State Space, or Zero Pole block. If you do specify a sample time of 0, MATLAB generates an error.
Stateflow models do not build if Borland 5.6 is chosen to be the MEX compiler.
You can use Borland Compiler 5.x versions earlier than 5.6 as the MEX compiler for building Stateflow models.
Stateflow does not check initial, minimum, and maximum values for data to ensure that they will fit in the data type. In addition, chart input data and machine parented data are not checked at run-time for out-of-range violations.
Whenever the maximum allowed number of users of Stateflow is reached, a demo version of Stateflow runs instead, without an error or warning message.