Chapter 14 Preparing Models for Use with ReactisTo use Reactis on a Simulink / Stateflow model, you must ensure
that the model satisfies certain constraints. This chapter
describes what these constraints are. Please note that,
while every effort is made to maintain the accuracy of the
following list of supported and unsupported features, due to
the complexity and continual evolution of the Simulink / Stateflow
notation this description may not be complete. For example,
some blocks listed as supported do not support all
parameters for the block. A block or feature not listed as
either supported or unsupported should be assumed to be
unsupported. We encourage all potential customers to take advantage of a
free evaluation license for Reactis to determine if the
subset of Simulink / Stateflow supported by Reactis is adequate for
your models. If not, please let us know what features or blocks
are lacking. Reactive Systems uses such feedback to prioritize
enhancements to Reactis. Reactis can process Simulink / Stateflow models that contain MATLAB code in callbacks
or mask initializations, provided that certain conventions are observed. On the
one hand, files that define workspace data items referred to in a model must be
“connected” to the model appropriately, and certain MATLAB functions should
be avoided. The remainder of this section elaborates on these points. 14.1.1 Workspace Data Items
Reactis invokes MATLAB to evaluate many MATLAB expressions, but it
does not directly interact with an executing MATLAB session in the
same way that Simulink does. For this reason, any workspace data
items that a model uses must be included in .m files that are attached
to a model using Simulink’s pre-load callback. For the
cruise-control example, the file
cruise_constants.m
defines two
workspace variables that are used in cruise.mdl. One attaches
cruise_constants.m
to cruise.mdl as follows: -
Load cruise.mdl into Simulink.
- From the Simulink window, select the File -> Model Properties
menu item.
- In the resulting dialog, select the Callbacks tab.
- In the Model pre-load function entry box enter
cruise_constants.
- Save the model.
In general, using the pre-load callback in this manner is good modeling
practice, since once the .m files are attached to a model file, loading the
model file into Simulink (and not just Reactis) will automatically load
the .m files as well. 14.1.2 Unsupported MATLAB Features
While Reactis supports most of MATLAB , the following exceptions may not be
used in Simulink / Stateflow models, e.g. in callbacks or mask initializations. Note, that a
feature added in V2010.2 adds partial support for these commands. To enable the
feature, check “Propagate set_param changes by saving the model to a temporary
file” in the Reactis Settings Dialog. If this setting is enabled, Reactis
will cause Simulink to apply all the changes to the model, then automatically
save them to a temporary file. Reactis then imports the temporary model
to see the applied changes.
| Expression Evaluation |
| ASSIGNIN | Assign variable in workspace. |
| EVALIN | Evaluate expression in workspace. |
| Model Construction/Modification |
| ADD_BLOCK | Add a block to a Simulink system. |
| ADD_LINE | Add a line to a Simulink system. |
| ADD_PARAM | Add a parameter to a Simulink system. |
| DELETE_BLOCK | Delete a block from a Simulink system. |
| DELETE_LINE | Delete a line from a Simulink system. |
| DELETE_PARAM | Deletes a parameter from a Simulink system. |
| NEW_SYSTEM | Create a new empty Simulink system. |
| REPLACE_BLOCK | Replace blocks in model. |
| SET_PARAM | Set Simulink system and block parameters. |
14.2 Simulink
Reactis currently supports Simulink releases R13 through R2011b. Most features
of Simulink are supported; but the following are not supported by Reactis:
-
Continuous-time blocks.
- Simulink signals with more than 2 dimensions.
- The use of complex values (i.e. values with real
and imaginary parts).
- Models containing corresponding DataStoreWrite/DataStoreRead
blocks whose execution order is not explicitly defined by either the model
logic or priorities.
For the subset of Simulink blocks supported by Reactis please refer to
Section 14.2.3. For blocks that can be either continuous- or
discrete-time, only the discrete-time version is supported. For some blocks
identified as supported not all settings are supported.
Reactis supports both C-Coded and M-File S-functions, with some
restrictions. For C-Coded S-functions, the following
are not supported by Reactis:
-
Port-based sample times.
- Multiple sample times.
- Complex number signals.
- Zero-crossing detection.
- Output of function-calls.
- Level 1 S-functions (For a guide on how to convert Level 1 S-functions
to Level 2 S-functions — which are supported by Reactis - please consult
the MathWorks documentation)
- Calling any function from MATLAB’s “mex” library (including
mexCallMATLAB, mexEvalString and mexGetVariable) from an S-Function.
For M-File S-functions, the following are not supported by Reactis:
-
Multiple sample times.
- Complex number signals.
- Level 2 S-functions.
In addition to the above restrictions, care must be taken about any internal
data that is stored by S-functions. In order to work properly,
Reactis must be able to retrieve and reset the values of all internal
states of any S-function occurring within a model. The best way to make
internal states visible to
Reactis (and Simulink) is to declare the appropriate number of discrete
states in the
mdlInitializeSizes() function and then use the state vector that
Reactis and
Simulink will provide. Reactis will also save and restore
memory that an S-function allocates as a result of calling the
ssGetNumRWork() and
ssGetNumIWork() during mdlInitializeSizes. Reactis has no way of knowing about any other persistent data that an
S-function maintains by other means, such as:
-
global or static variables in C-code;
- memory allocated by malloc() or mxMalloc() functions
in C-code;
- Use of workspace variables in M-File S-functions.
Reactis will also not save and restore memory requested by
ssGetNumPWork(), since otherwise pointers stored in this vector by your
S-function might get lost or mangled, resulting in memory leaks or crashes. If an S-function stores internal states in any of the unsupported ways
described above, Reactis will seem to work properly, but the test
suites generated by Tester may include wrong outputs. One sign of
this can be if you run a test suite in Simulator and get an error
message saying “Model fails test”. Another problem of such
invalid use of internal states may be invalid outputs after using the
“back” buttons in Simulator.
In general, Reactis passes S-Function parameters as fixed values at the time
the S-Function is first initialized (i.e. when Tester or Simulator is
started). Therefore, if a configuration variable is used as a parameter to an
S-Function, the S-Function will not see any changes to the configuration
variable unless the S-Function is designed to process such updates. To have an
S-Function be updated on changes to its parameters, define a mdlProcessParameters function (see Simulink documentation) within the
S-Function code. If this function is present, then Reactis will propagate the
parameter changes into the S-Function by calling the S-Function’s mdlProcessParameters function at each step with the new parameter values. In the mdlProcessParameters function the S-Function can then take appropriate actions
if any parameters have changed. 14.2.2 Lookup TablesThis section describes the settings for each of the standard Simulink Lookup
Table blocks that are supported by Reactis. Some settings might not be relevant
depending on the version of MATLAB used. For example, many data type settings
for the “Lookup Table (n-D)” block were only introduced in MATLAB R2009b and
therefore are not relevant when using Reactis with MATLAB R2009a or earlier. 1-D Lookup TableNote that this block was previously named Lookup Table block.
All block settings and the following data type combinations are supported.
“fixpoint” includes all fixed-point data types as well as built-in integer
data types int8, uint8, int16, uint16, int32, and uint32.
| Supported Data Type Combinations |
| Input of LUT | Output of LUT |
| double | double |
| single | double |
| fixpoint | double |
| single | single |
| fixpoint | single |
| double | fixpoint |
| single | fixpoint |
| fixpoint | fixpoint |
| double | boolean |
| single | boolean |
| fixpoint | boolean |
2-D Lookup TableNote this block was previously named Lookup Table (2-D).
All block settings and the following data type combinations are supported.
“fixpoint” includes all fixed-point data types as well as built-in integer
data types int8, uint8, int16, uint16, int32 and uint32.
| Supported Data Type Combinations |
| 1st Input of LUT | 2nd Input of LUT | Output of LUT |
| double | double | double |
| double | fixpoint | double |
| double | bool | double |
| single | single | double |
| fixpoint | double | double |
| fixpoint | fixpoint | double |
| bool | double | double |
| single | single | single |
| single | fixpoint | single |
| single | bool | single |
| fixpoint | single | single |
| fixpoint | fixpoint | single |
| bool | single | single |
| double | double | fixpoint |
| single | single | fixpoint |
| fixpoint | fixpoint | fixpoint |
| fixpoint | fixpoint | bool |
| double | double | bool |
| single | single | bool |
n-D Lookup TableThis block was previously named Lookup Table (n-D). Reactis supports a wide
variety of n-D lookup tables, subject to restrictions which depend on the number
of table dimensions. There are two levels of support, native and via
S-function. Native support means Reactis will natively execute the n-D lookup table
block and track coverage for it. Only n-D lookup tables which satisfy the
following requirements are natively supported in Reactis: -
The number of table dimensions is at most two.
- The interpolation and extrapolation methods are not cubic spline.
- Each breakpoint data type matches the corresponding input data type.
- The output data type matches the table data type.
- If the table is 1-dimensional, then
the fraction data type must satisfy at least one of the following requirements:
-
The fraction, input, and output data types are floating-point types.
- The fraction and output data types are fixpoint types.
- The fraction and output data types are the same floating-point type and the
input data type is a fixpoint type.
- The fraction and input data type are the same floating-point type and the
output data type is a fixpoint type.
- If the table is 2-dimensional, then
both of the following requirements must be satisfied:
-
Both input types must be the same.
- The intermediate data type matches the output data type.
Support via S-function means Reactis can execute the n-D lookup block
but not track coverage. In order to execute the block,
Reactis requires the sfun_lookupnd.mexw32 S-Function that
comes with MATLAB R2007a or earlier. Starting with MATLAB R2007b,
this S-Function is no longer included in the MATLAB distribution.
However, if a sfun_lookupnd.mexw32 from R2007a
or earlier is placed in Reactis’ search path,
Reactis can use that S-Function even with R2007b
and later. n-D lookup tables which meet the following six requirements are supported via S-function
in Reactis: -
The input and output data types are the same floating-point type.
- The fraction data type is set to Inherit via internal rule.
- The table data type is set to Inherit: same as output.
- The breakpoint data type is set to Inherit: same as corresponding input.
- All inputs are scalars.
- If the table has more than one dimension,
then the intermediate data type is set to Inherit: same as output.
Direct Lookup Table (n-D)Only floating-point (double and single) data types are supported. This table is supported in Reactis via the sfun_nddirectlook.mexw32 S-Function that comes
with MATLAB R2009a and earlier. Starting with MATLAB R2009b, this S-Function is no
longer included in the MATLAB distribution. However, if a sfun_lookupnd.mexw32 from R2009a
or earlier is placed in Reactis’ search path, Reactis can use that S-Function even with R2009b
and later. Lookup Table DynamicAll parameters and the data type configurations listed for the “Lookup Table” block above
are supported. PrelookupAll parameters are supported. The following data type restrictions apply:
-
Only floating-point (double and single) input data types are supported.
- Only “int32” and “uint32” are supported as the data type of the “index” output.
- Only “single” and “double” are supported as the data type of the “fraction” output.
Interpolation using PrelookupAll parameters are supported. The following data type restrictions apply:
-
Only floating-point (double and single) data types are supported for “fraction” inputs.
- Data types of all “fraction” inputs must be the same as the output data type.
- Only “int32” and “uint32” are supported as the data type of the “index” input.
- Table data type must match output data type
- Intermediate results data type must match output data type.
14.2.3 Table of Supported Blocks
| Block | Introduced | Reactis
Support | Notes |
| Commonly Used Blocks |
|
Bus Creator | pre-R14 | Y | |
| Bus Selector | pre-R14 | Y | |
| Constant | pre-R14 | Y | |
| Data-Type Conversion | pre-R14 | Y | |
| Demux | pre-R14 | Y | |
| Discrete-Time Integrator | pre-R14 | Y | |
| Gain | pre-R14 | Y | |
| Ground | pre-R14 | Y | |
| Inport | pre-R14 | Y | |
| Integrator | pre-R14 | N | |
| Logical Operator | pre-R14 | Y | |
| Mux | pre-R14 | Y | |
| Outport | pre-R14 | Y | |
| Product | pre-R14 | Y | |
| Relational Operator | pre-R14 | Y | |
| Saturation | pre-R14 | Y | |
| Scope | pre-R14 | Y | |
| Subsystem | pre-R14 | Y | |
| Sum | pre-R14 | Y | |
| Switch | pre-R14 | Y | |
| Terminator | pre-R14 | Y | |
| Unit Delay | pre-R14 | Y | |
| Vector Concatenate | R14 | Y | |
| Continuous |
|
Derivative | pre-R14 | N | |
| Integrator | pre-R14 | N | |
| Integrator Limited | R2010a | N | |
| Integrator Second-Order | R2010a | N | |
| Integrator Second-Order Limited | R2010a | N | |
| PID Controller | R2009b | N | |
| PID Controller (2 DOF) | R2009b | N | |
| State-Space | pre-R14 | N | |
| Transfer Fcn | pre-R14 | N | |
| Transport Delay | pre-R14 | N | |
| Variable Time Delay | R2007b | N | |
| Variable Transport Delay | pre-R14 | N | |
| Zero-Pole | pre-R14 | N | |
| Discontinuities |
|
Backlash | pre-R14 | Y | |
| Coulomb & Viscous Friction | pre-R14 | Y | |
| Dead Zone | R14 | Y | |
| Dead Zone Dynamic | R14 | Y | |
| Hit Crossing | R14 | Y | |
| Quantizer | pre-R14 | Y | |
| Rate Limiter | pre-R14 | Y | |
| Rate Limiter Dynamic | R14 | Y | |
| Relay | pre-R14 | Y | |
| Saturation | pre-R14 | Y | |
| Saturation Dynamic | R14 | Y | |
| Wrap To Zero | R14 | Y | |
| Discrete |
|
Delay | R2011b | Y | In R2011b, the Integer Delay block
was extended and renamed to the Delay block.
Reactis requires:
-
Delay length source must be Dialog
- Initial condition source must be Dialog
- External reset must be None
- Input processing must be Elements as channels (sample based)
or Inherited
|
| Difference | R14 | Y | |
| Discrete Derivative | R14 | Y | |
| Discrete Filter | pre-R14 | Y | |
| Discrete FIR Filter | R2008a | N | In R2008a, replaced the Weighted Moving
Average block. |
| Discrete PID Controller | R2009b | N | |
| Distrete PID Controller (2 DOF) | R2009b | N | |
| Discrete State-Space | pre-R14 | Y | |
| Discrete Transfer Fcn | pre-R14 | Y | |
| Discrete Zero-Pole | R14 | Y | |
| Discrete-Time Integrator | pre-R14 | Y | |
| First-Order Hold | R14 | N | |
| Memory | pre-R14 | Y | |
| Tapped Delay | R14 | Y | |
| Transfer Fcn First Order | R14 | Y | |
| Transfer Fcn Lead or Lag | R14 | Y | |
| Transfer Fcn Real Zero | R14 | Y | |
| Unit Delay | pre-R14 | Y | |
| Zero-Order Hold | pre-R14 | Y | |
| Logic and Bit Operations |
|
Bit Clear | pre-R14 | Y | |
| Bit Set | pre-R14 | Y | |
| Bitwise Operator | pre-R14 | Y | |
| Combinatorial Logic | pre-R14 | Y | |
| Compare To Constant | pre-R14 | Y | |
| Compare To Zero | pre-R14 | Y | |
| Detect Change | pre-R14 | Y | |
| Detect Decrease | pre-R14 | Y | |
| Detect Fall Negative | pre-R14 | Y | |
| Detect Fall Nonpositive | pre-R14 | Y | |
| Detect Increase | pre-R14 | Y | |
| Detect Rise Nonnegative | pre-R14 | Y | |
| Detect Rise Positive | pre-R14 | Y | |
| Extract Bits | R14 | Y | |
| Interval Test | pre-R14 | Y | |
| Interval Test Dynamic | pre-R14 | Y | |
| Logical Operator | pre-R14 | Y | |
| Relational Operator | pre-R14 | Y | |
| Shift Arithmetic | pre-R14 | Y | |
| Lookup Tables |
|
1-D Lookup Table | pre-R14 | Y | Previously called Lookup Table block.
See Section 14.2.2.1 |
| 2-D Lookup Table | pre-R14 | Y | Previously called Lookup Table (2-D).
See Section 14.2.2.2 |
| Cosine | pre-R14 | Y | Only output formula cos |
| Direct Lookup Table (n-D) | pre-R14 | Y | See Section 14.2.2.4 |
| Interpolation using Prelookup | pre-R14 | Y | See Section 14.2.2.7 |
| Lookup Table Dynamic | R14 | Y | See Section 14.2.2.5 |
| n-D Lookup Table | pre-R14 | Y | See Section 14.2.2.3 |
| Prelookup | pre-R14 | Y | See Section 14.2.2.6 |
| Sine | pre-R14 | Y | Only output formula sin |
| Math Operations |
|
Abs | pre-R14 | Y | |
| Add | pre-R14 | Y | |
| Algebraic Constraint | pre-R14 | N | |
| Assignment | pre-R14 | Y | |
| Bias | R14 | Y | |
| Complex to Magnitude-Angle | pre-R14 | N | |
| Complex to Real-Imag | pre-R14 | N | |
| Divide | pre-R14 | Y | |
| Dot Product | pre-R14 | Y | |
| Find Nonzero Elements | R2010a | N | |
| Gain | pre-R14 | Y | |
| Magnitude-Angle to Complex | pre-R14 | N | |
| Math Function | pre-R14 | Y | Except Hermitian |
| Matrix Concatenate | pre-R14 | Y | |
| MinMax | pre-R14 | Y | |
| MinMax Running Resettable | pre-R14 | Y | |
| Permute Dimensions | R2007a | N | |
| Polynomial | pre-R14 | Y | |
| Product | pre-R14 | Y | |
| Product of Elements | pre-R14 | Y | |
| Real-Imag to Complex | pre-R14 | N | |
| Reciprocal Sqrt | R2010a | Y | |
| Reshape | pre-R14 | Y | |
| Rounding Function | pre-R14 | Y | |
| Sign | pre-R14 | Y | |
| Signed Sqrt | R2010a | Y | |
| Sine Wave Function | pre-R14 | Y | Using simulation time |
| Slider Gain | pre-R14 | Y | |
| Sqrt | R2010a | Y | |
| Squeeze | R2007a | N | |
| Subtract | pre-R14 | Y | |
| Sum | pre-R14 | Y | |
| Sum of Elements | pre-R14 | Y | |
| Trigonometric Function | pre-R14 | Y | |
| Unary Minus | pre-R14 | Y | |
| Vector Concatenate | R14 | Y | |
| Weighted Sample Time Math | R14 | Y | |
| Model Verification |
|
Assertion | pre-R14 | N | |
| Check Discrete Gradient | pre-R14 | N | |
| Check Dynamic Gap | pre-R14 | N | |
| Check Dynamic Lower Bound | pre-R14 | N | |
| Check Dynamic Range | pre-R14 | N | |
| Check Dynamic Upper Bound | pre-R14 | N | |
| Check Input Resolution | pre-R14 | N | |
| Check Static Gap | pre-R14 | N | |
| Check Static Lower Bound | pre-R14 | N | |
| Check Static Range | pre-R14 | N | |
| Check Static Upper Bound | pre-R14 | N | |
| Model-Wide Utilities |
|
Block Support Table | R2007a | N | |
| DocBlock | pre-R14 | Y | |
| Model Info | pre-R14 | Y | Reactis will process models containing
these blocks but does not display the
information stored in them. |
| Time-Based Linearization | pre-R14 | N | |
| Trigger-Based Linearization | pre-R14 | N | |
| Ports & Subsystems |
|
Atomic Subsystem | pre-R14 | Y | |
| CodeReuse Subsystem | R14 | N | |
| Configurable Subsystem | pre-R14 | Y | |
| Enable | pre-R14 | Y | |
| Enabled Subsystem | pre-R14 | Y | |
| Enabled and Triggered Subsystem | pre-R14 | Y | |
| For Each Subsystem | R2010a | N | |
| For Iterator Subsystem | pre-R14 | Y | |
| Function-Call Feeback Latch | R2011a | Y | |
| Function-Call Generator | pre-R14 | Y | |
| Function-Call Split | R2010a | Y | |
| Function-Call Subsystem | pre-R14 | Y | |
| If | pre-R14 | Y | |
| If Action Subsystem | pre-R14 | Y | |
| Inport | pre-R14 | Y | |
| Model | R14 | Y | |
| Model Variant | R2009b | Y | |
| Outport | pre-R14 | Y | |
| Subsystem | pre-R14 | Y | |
| Switch Case | pre-R14 | Y | |
| Switch Case Action Subsystem | pre-R14 | Y | |
| Trigger | pre-R14 | Y | |
| Triggered Subsystem | pre-R14 | Y | |
| Variant Subsystem | R2010b | Y | |
| While Iterator Subsystem | pre-R14 | Y | |
| Signal Attributes |
|
Bus to Vector | R2007b | N | |
| Data Type Conversion | pre-R14 | Y | |
| Data Type Conversion Inherited | pre-R14 | Y | |
| Data Type Duplicate | pre-R14 | Y | |
| Data Type Propagation | pre-R14 | Y | |
| Data Type Scaling Strip | pre-R14 | Y | |
| IC | pre-R14 | Y | |
| Probe | pre-R14 | Y | |
| Rate Transition | pre-R14 | Y | |
| Signal Conversion | pre-R14 | Y | |
| Signal Specification | pre-R14 | Y | |
| Weighted Sample Time | R14 | Y | |
| Width | pre-R14 | Y | |
| Signal Routing |
|
Bus Assignment | R14 | Y | |
| Bus Creator | pre-R14 | Y | |
| Bus Selector | pre-R14 | Y | |
| Data Store Memory | pre-R14 | Y | |
| Data Store Read | pre-R14 | Y | |
| Data Store Write | pre-R14 | Y | |
| Demux | pre-R14 | Y | |
| Environment Controller | R14 | Y | |
| From | pre-R14 | Y | |
| Goto | pre-R14 | Y | |
| Goto Tag Visibility | pre-R14 | Y | |
| Index Vector | pre-R14 | Y | |
| Manual Switch | pre-R14 | N | |
| Merge | pre-R14 | Y | |
| Multiport Switch | pre-R14 | Y | ’Data port for default case’ must be ’Last data port’ and
’Diagnostic for default case’ must be ’Error’ |
| Mux | pre-R14 | Y | |
| Selector | pre-R14 | Y | |
| Switch | pre-R14 | Y | |
| Vector Concatenate | R14 | Y | |
| Sinks |
|
Display | pre-R14 | Y | |
| Floating Scope | pre-R14 | Y | |
| Outport | pre-R14 | Y | |
| Scope | pre-R14 | Y | |
| Stop Simulation | pre-R14 | N | |
| Terminator | pre-R14 | Y | |
| To File | pre-R14 | N | You can configure Reactis to ignore
To File blocks from the Settings dialog. |
| To Workspace | pre-R14 | N | You can configure Reactis to ignore
To Workspace blocks from the Settings dialog. |
| XY Graph | pre-R14 | N | |
| Sources |
|
Band-Limited White Noise | pre-R14 | N | |
| Chirp Signal | pre-R14 | N | |
| Clock | pre-R14 | N | |
| Constant | pre-R14 | Y | |
| Counter Free-Running | pre-R14 | Y | |
| Counter Limited | pre-R14 | Y | |
| Digital Clock | pre-R14 | Y | |
| Enumerated Constant | R2009b | Y | |
| From File | pre-R14 | Y | .mat file must be in ’Array’ format, not ’MATLAB timeseries object’ format.
Linear interpolation and extrapolation must be used. |
| From Workspace | pre-R14 | Y | |
| Ground | pre-R14 | Y | |
| Inport | pre-R14 | Y | |
| Pulse Generator | pre-R14 | Y | ’Pulse type’ must be ’sample based’ and ’Time (t)’ must be ’Use simulation time’ |
| Ramp | pre-R14 | Y | |
| Random Number | pre-R14 | Y | This block may only be used in virtual sources. |
| Repeating Sequence | pre-R14 | Y | |
| Repeating Sequence Interpolated | R14 | Y | |
| Repeating Sequence Stair | R14 | Y | |
| Signal Builder | pre-R14 | Y | |
| Signal Generator | pre-R14 | Y | ’Wave form’ of ’random’ not supported |
| Sine Wave | pre-R14 | Y | ’Time (t)’ must be ’Use simulation time’ |
| Step | pre-R14 | Y | |
| Uniform Random Number | pre-R14 | N | |
| User-Defined Functions |
|
Fcn | pre-R14 | Y | |
| Interpreted MATLAB Function | pre-R14 | N | Previously called MATLAB Fcn |
| Level-2 MATLAB S-Function | pre-R14 | N | |
| MATLAB Fcn | pre-R14 | N | |
| MATLAB Function | pre-R14 | N | Previously called Embedded MATLAB Function |
| S-function | pre-R14 | Y | |
| S-function Builder | pre-R14 | Y | |
| Additional Discrete |
|
Fixed-Point State-Space | R14 | Y | |
| Transfer Fcn Direct Form II | R14 | N | |
| Transfer Fcn Direct Form II Time Varying | R14 | N | |
| Unit Delay Enabled | pre-R14 | Y | |
| Unit Delay Enabled External IC | pre-R14 | Y | |
| Unit Delay Enabled Resettable | pre-R14 | Y | |
| Unit Delay Enabled Resettable External IC | pre-R14 | Y | |
| Unit Delay External IC | pre-R14 | Y | |
| Unit Delay Resettable | pre-R14 | Y | |
| Unit Delay Resettable External IC | pre-R14 | Y | |
| Unit Delay With Preview Enabled | pre-R14 | Y | |
| Unit Delay With Preview Enabled Resettable | pre-R14 | Y | |
| Unit Delay With Preview Resettable External RV | pre-R14 | Y | |
| Unit Delay With Preview Resettable | pre-R14 | Y | |
| Unit Delay With Preview Enabled Resettable External RV | pre-R14 | Y | |
| Additional Math |
|
Decrement Real World | pre-R14 | Y | |
| Decrement Stored Integer | pre-R14 | Y | |
| Decrement Time To Zero | pre-R14 | Y | |
| Decrement To Zero | pre-R14 | Y | |
| Increment Real World | pre-R14 | Y | |
| Increment Stored Integer | pre-R14 | Y | |
14.2.4 Simulink ExtrasThe following table lists the supported blocks from the
“Simulink extras” library which is available in all MATLAB
versions:
| Additional Discrete |
| Supported: |
Discrete Transfer Fcn (with initial outputs),
Discrete Transfer Fcn (with initial states),
Discrete Zero-Pole (with initial outputs),
Discrete Zero-Pole (with initial states),
Idealized ADC Quantizer |
| Unsupported: | |
| Additional Linear |
| Supported: | |
| Unsupported: |
State-Space (with initial outputs),
Transfer Fcn (with initial outputs),
Transfer Fcn (with initial states),
Zero-Pole (with initial outputs),
Zero-Pole (with initial states) |
| Additional Sinks |
| Supported: | |
| Unsupported: |
Auto Correlator,
Averaging Power Spectral Density,
Averaging Spectrum Analyzer,
Cross Correlator,
Floating Bar Plot,
Power Spectral Density,
Spectrum Analyzer |
| Flip Flops |
| Supported: |
D Flip-Flop,
D Latch,
J-K Flip-Flop,
S-R Flip-Flop |
| Unsupported: |
Clock |
| Linearization |
| Supported: | |
| Unsupported: |
Switched derivative for linearization,
Switched transport delay for linearization |
| Transformations |
| Supported: |
Cartesian to Polar,
Cartesian to Spherical,
Celsius to Fahrenheit,
Degrees to Radians,
Fahrenheit to Celsius,
Polar to Cartesian,
Radians to Degrees,
Spherical to Cartesian |
| Unsupported: | |
14.2.5 TargetLink 2.2.1 Library BlocksThe following table lists the supported blocks from the
dSPACE TargetLink 2.2.1 library, if installed:
| Main TargetLink Library |
| Supported: |
Inport,
Outport,
Constant,
Sum,
Gain,
Product,
Logical Operator,
Relational Operator,
Fcn,
Look-Up Table,
Look-up Table (2-D),
Direct Look-up Table (n-D),
PreLook-Up Index Search,
Interpolation (n-D) using PreLook-Up,
Saturation,
MinMax,
Abs,
Sign,
Relay,
Trigonometric Function,
Math,
Unit Delay,
Discrete Transfer Fcn,
FIR Filter,
Discrete-Time Integrator,
Discrete State-Space,
Data Store Write,
Data Store Memory,
Data Store Read,
Merge,
Sink,
Bus Inport,
Bus Outport,
Switch,
Multiport Switch,
Unit Delay (Reset Enabled), |
| Unsupported: | Rate Limiter |
| Non-Linear |
| Supported: |
Dead Zone Positive,
Dead Zone Negative,
Saturation Dynamic,
Backlash |
| Unsupported: | Dead Zone,
Dead Zone Dynamic |
| Math |
| Supported: |
Rounding Function,
Transport Delay |
| Unsupported: | |
| Extras |
| Supported: |
D Flip-Flop,
D Latch,
J-K Flip-Flop,
S-R Flip-Flop,
Preprocessor IF |
| Unsupported: | |
| Bit Operations |
| Supported: |
U8 Bit Set,
U16 Bit Set,
U32 Bit Set ,
U8 Bit Clear,
U16 Bit Clear,
U32 Bit Clear,
Split U16,
Split U32,
Combine U16,
Combine U32,
8Bit Decoder,
8Bit Encoder,
16Bit Decoder,
16Bit Encoder,
Bitwise Logical Operator |
| Unsupported: | |
| TargetLink-Supported Simulink Blocks |
| Supported: |
Please see list of Reactis-Supported Simulink Blocks |
| Unsupported: | |
14.2.6 TargetLink 3.0 Library BlocksThe following table lists the supported blocks from the
dSPACE TargetLink 3.0 library, if installed:
| Main TargetLink Library |
| Supported: |
Inport,
Outport,
Constant,
Sum,
Gain,
Product,
Logical Operator,
Relational Operator,
Fcn,
Look-Up Table,
Look-up Table (2-D),
Direct Look-up Table (n-D),
PreLook-Up Index Search,
Interpolation (n-D) using PreLook-Up,
Saturation,
MinMax,
Abs,
Sign,
Rate Limiter,
Relay,
Trigonometric Function,
Math,
Unit Delay,
Discrete Transfer Fcn,
FIR Filter,
Discrete-Time Integrator,
Discrete State-Space,
Data Store Write,
Data Store Memory,
Data Store Read,
Merge,
Sink,
Bus Inport,
Bus Outport,
Switch,
Multiport Switch,
Unit Delay (Reset Enabled), |
| Unsupported: | |
| Non-Linear |
| Supported: |
Backlash,
Dead Zone Positive,
Dead Zone Negative,
Saturation Dynamic,
Dead Zone,
Dead Zone Dynamic |
| Unsupported: | |
| Math |
| Supported: |
Rounding Function,
Transport Delay |
| Unsupported: | |
| Extras |
| Supported: |
D Flip-Flop,
D Latch,
J-K Flip-Flop,
S-R Flip-Flop,
Preprocessor IF |
| Unsupported: | |
| Bit Operations |
| Supported: | U8 Bit Set,
U16 Bit Set,
U32 Bit Set ,
U8 Bit Clear,
U16 Bit Clear,
U32 Bit Clear,
Split U16,
Split U32,
Combine U16,
Combine U32,
8Bit Decoder,
8Bit Encoder,
16Bit Decoder,
16Bit Encoder,
Bitwise Logical Operator |
| Unsupported: | |
| TargetLink-Supported Simulink Blocks |
| Supported: |
Please see list of Reactis-Supported Simulink Blocks |
| Unsupported: | |
14.3 Stateflow
Reactis supports most of Stateflow. Some exceptions are the
following unsupported features:
-
Implicit “enter”, “exit” and “change” events
- Range limits for variables.
- “ml.” namespace operator and “ml()” function call.
- Embedded MATLAB code.
- When using expressions in the ’size’ field of a Stateflow
variable declaration, all references to constants within the
expression must refer to constants that are defined in the MATLAB
workspace.
- Using Stateflow keywords as variable names. The Stateflow
keywords are:
at, after, before, change, du, during, enter, en, entry,
every, ex, exit, in, on, ml, send, abs, acos, asin,
atan, atan2, ceil, cos, cosh, exp, fabs, floor,
fmod, labs, ldexp, log, log10, min, max, pow,
rand, rem, sin, sinh, sqrt, tan, tanh, int8,
int16, int32, uint8, uint16, uint32, double,
boolean.
- The explicit type cast function (“cast”)
- The address operator (
&) is supported only in calls to external
C functions.
- The pointer operator (
*) is supported only inside a literal C code
section.
- Charts without trigger or sample time are supported only if the
model has a fixed sample time.
- In some cases, the detection of inner transitions fails for
odd-shaped transitions (for example, single transition segments which
leave and reenter a state).
- Using “bind” actions.
- Graphical functions with multiple outputs.
- Absolute time in temporal logic operators (i.e. using the
sec keyword).
- The
temporalCount operator.
- Simulink function-call subsystems.
- Atomic Subcharts (introduced in R2010b).
|