필터 지우기
필터 지우기

Simulink Variables in the Model Explorer NEVER Change? Why??????

조회 수: 5 (최근 30일)
Thomas
Thomas 2014년 8월 7일
답변: Thomas 2014년 8월 7일
Hi All,
I inherited a Simulink file because I was asked to continue someone else's work. I agreed to this, and now I would like to modify some of the constants called out in the model explorer. When I do this, the constants automatically revert back to their initial values when the run button is pressed.
Scenario:
Matlab starts, I open the Simulink file. There are no variables in the model explorer when I start, after I hit run the constants in the model explorer populate. I change values of constants in model explorer. I press 'run', the values revert back to their original value and completes its execution of the program.
How can I change the constants?! Is there a file setting that I can untick somewhere? What is going on?
Thanks, -t
Matlab 2011Ra Windows 7
  댓글 수: 4
Andy L
Andy L 2014년 8월 7일
Given the amount of control you can have over simulink blocks it is very difficult to tell what this could be.
I would check to see if any of your sub-systems are masked? Coding in these masks can change the values of variables upon running the model.
Thomas
Thomas 2014년 8월 7일
Yes there are several layers of masks and I have followed a single variable to five locations, ALL locations of which use the variable in an equation, it does not try to update it. I will ask if I can post the file however, you would require the mss (hydrodynamics and vessel guidance) toolbox free from thor fossen's website to run it.

댓글을 달려면 로그인하십시오.

채택된 답변

Thomas
Thomas 2014년 8월 7일
A workaround has been found. Placing the variables in the model workspace instead of the base workspace has fixed the non-updating issue. This is a partial solution. All of the variables in the base workspace still load and are not modifiable. This works out fine though because the model workspace overrides the base workspace for any used variables.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by