Why Some Signals in Submodels Are Available in Model Interface Toolkit While Others Aren't?

Updated Jan 27, 2020

Reported In

Software

  • LabVIEW Model Interface Toolkit for VeriStand

Issue Details

I found that there are some signals in the submodels from Simulink model that can be accessed while others cannot be accessed. Are there any conditions for signals and parameters in submodels to become available in Model Interface Toolkit?

Solution

As the help document indicates in Conditions Where Signals/Parameters Are Unavailable sections, you cannot access parameters or signals in submodels. However; if they are marked as test points in the Simulink software, they become available for probing including the ones in submodels. While we would expect that all signals that have test point will be exported and visible in Model Interface Toolkit, if they are Stateflow signals, they can be disabled by selecting "Disable all Stateflow signals" option in the Configuration Parameters dialog box in Code Generation > NI Configuration.

Regarding how/why test points may not be exported, the Model Framework can only process what Simulink passes. Simulink optimizes the model before it passes control over to the Model Framework. In general, signals including the ones in Stateflow designated as test points are exported since they are more unlikely for Simulink to optimize away those signals. However, if Simulink sees no functionality for those signals, they still can be optimized away. If they are optimized away, they will not be available in Model Interface Toolkit. If this happens but they are necessary to be accessed in , you need to pass them up to the top-level. Note that Stateflow is a part of Toolboxes that are not fully supported by the Model Framework 2018.