Table Of Contents

How VeriStand Imports Models from MathWorks Simulink® Software

Last Modified: June 10, 2021

VeriStand identifies inports, outports, parameters, and signals in models you created in Simulink software according to their configuration in Simulink.

A simple model in Simulink might contain the following components.

When you add this model to a system definition in VeriStand, its components appear as shown in the following table.
Component in model Type of component in VeriStand
Raw_Sine Signal
Sine_Gain Parameter
In1 Inport
Out1 Outport
spd-note-note
Note  

In models compiled in Simulink R2010b software or later, VeriStand organizes named components of bus objects, such as signals, into folders that match the hierarchy of the bus. For models compiled in versions of the Simulink software earlier than R2010b, VeriStand represents bus objects as a single vector of components.

Signal Importing

Model signals are excluded when you convert a model into a compiled model unless you define a signal as a test point in the application you use to compile the model.

VeriStand supports model references. However, you cannot access or map the signals in submodels when you execute them in VeriStand.

Certain optimizations you enable in Simulink can make a signal unavailable in VeriStand. You can disable these options for the entire model to make all signals available for probing, but the memory footprint of the model increases as a result. Alternatively, you can mark individual signals as test points in Simulink to maintain a reduced memory footprint while keeping the test-point signals available for probing.
spd-note-note
Note  

If you mark new signals as test points, you must recompile your model.

Parameter Importing

Compiled models contain one of two types of parameters in VeriStand:
  • Global parameters, by default, applies to the current model and to any global parameters with the same name in other models on the target. This parameter is similar to a workspace variable in MathWorks MATLAB® software. If you set inline parameters in the Simulink software, MathWorks Real-Time Workshop® software converts MATLAB workspace variables to global parameters in the compiled model.
  • Local parameters only apply to the specific model and block or subsystem that they belong to. If you do not set inline parameters in Real-Time Workshop, block parameters remain block parameters in the compiled model.

A Simulink model can contain only one type of parameter. However, a system definition can contain a model with global parameters and a model with block parameters.

VeriStand supports model references to submodels, but you cannot access parameters in submodels. Submodels execute in a VeriStand system, but their parameters are not available for mapping.

In Simulink, you can inline parameters. In VeriStand, inlined parameters are not available for configuration. However, even if you inline a parameter in Simulink, you still can allow users to influence the parameter by configuring a variable that affects the parameter to be tunable.

For example, consider a model with the following characteristics:
  • Contains a constant configured with an expression (x + 3).
  • Contains a sine wave block whose amplitude and frequency parameters are inlined, and therefore unavailable in VeriStand.
  • Adds the result of the constant to the output from the sine wave block.

Although the parameters of the sine wave block are unavailable, you can influence the operation by specifying that the x variable is tunable in Simulink. After you add the model to VeriStand, when x is tunable, it will appear in the Parameters list in System Explorer. You can change the value of x as the model executes.

Inport and Outport Importing

Top-level Simulink inports and outports become VeriStand inports and outports. Submodel inports and outports in Simulink import only if you place VeriStand inport and outport blocks within the submodel in Simulink.
spd-note-note
Note  

If you want to run a Simulink model on a desktop computer without compiling it, you must use the VeriStand inport and outport block.


Recently Viewed Topics