Multiple Errors running 2015b Simulink model in 2021b

10 views (last 30 days)
I have a simulink testbench build in MATLAB 2015b, which runs without errors. However, when attempting to run in 2021b, I am getting the following error when running the 'Sim' command
Error using <Script_Name>/<Function> (line 153)
Unable to update models referenced by '<Model_Name>'.
Error in <Script_Name> (line 75)
<Script_Object>.<Function>(<Function inputs>); - Show complete stack trace
Caused by:
Error using <Script_Name>/<Function> (line 153)
Invalid setting in '<Model_Block>/<Port>' for parameter 'OutDataTypeStr'. - Show complete stack trace
Error using <Script_Name>/<Function> (line 153)
Error evaluating parameter 'OutDataTypeStr' in '<Model_Block>/<Port>' - Show complete stack trace
Error using <Script_Name>/<Function> (line 153)
Unrecognized function or variable '<var>'. - Show complete stack trace
Error using <Script_Name>/<Function> (line 153)
Variable '<var>' does not exist.
Suggested Actions:
• Load a file into base workspace. - Fix
• Create a new variable. - Fix
- Show complete stack trace
I have made sure that the variable <var> is in the workspace of the function, and ' Create a new variable. - Fix' option comes up with the following text:
Unrecognized function or variable 'obj'.
ans =
'No action taken because variable '<var>' already exists.'
Error using robustVarRefHotlink_cb
Operation has been canceled.
Error in robustVarRefHotlink_cb
Error in slprivate - Show complete stack trace
How can I resolve this issue? Are there any additional steps I need to take to update the model between MATLAB versions?
  1 Comment
Mitch Lautigar
Mitch Lautigar on 21 Apr 2022
MATLAB changes functionality and libraries in between versions. Small jumps (e.g. 2020a to 2020b) typically won't cause crashes. Large jumps (2015 to 2021) can cause crashes because the reference libraries have changed.
Solution: Load the 2015 simulation into 2020 and test it. MATLAB let's you save files to older versions, but if you are going from older to newer, you might have to update/change the code.

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Environment Customization in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!