Accessing Simulink® Submodel Signals, Ports or Parameters in NI VeriStand

Updated Apr 7, 2023

Reported In

Software

  • VeriStand

Other

  • The Mathworks, Inc. MATLAB®
  • The Mathworks, Inc. Simulink®

Issue Details

I am using The Mathworks, Inc. Simulink® software to program simulation models for NI VeriStand, and I wish to access ports, parameters or signals located in a submodel. How can I do this?

Solution

Inports and Outports in Submodels
Inports and outports located on the top-level of the simulation hierarchy are available in NI VeriStand by default. Inports and outports in submodels are only available if you place NI VeriStand inport and outport blocks in the submodel in Simulink® instead of the default inport and outport blocks.

Parameters or Signals in Submodels
Parameters or signals located in submodels are not available for mapping.

Refer to Understanding How NI VeriStand Imports Models from The MathWorks, Inc. Simulink® Software for further information.

MATLAB®, Simulink®, and Real-Time Workshop® are registered trademarks of The MathWorks, Inc. All other trademarks are the property of their respective owners.

Additional Information

If you see compilation errors when trying to implement the NI VeriStand inport and outport blocks in Simulink®, refer to Failure When Compiling Model for VeriStand in Simulink®
If you are doing co-simulation (running the MDL file directly instead of building it into a DLL and running it in VeriStand), you will need to use the VeriStand inports and outports to communicate properly.