Some Constant blocks not tunable in Simulink External Mode

5 次查看(过去 30 天)
I'm running 2014a and I am using a Simulink model in External run mode. I have a few constant blocks I'd like to change the value of however they aren't all tunable during run time. For instance, Constant1 and Constant2 are connected to a Subsystem and Constant1's block properties are greyed out during runtime however Constant2's block properties I can change during runtime. They are virtually identically blocks wrt properties. Not sure what's going on here.
  3 个评论
Mike Buba
Mike Buba 2021-10-24
I noticed the not tunable constants were directly or indirectly, via subtract block (reference - feedback), connected to the PID Controller block.
When I implemented my PI block (similar to as it is under the PID Controller's mask), I could tune them.

请先登录,再进行评论。

回答(1 个)

Sebastian Castro
Sebastian Castro 2015-5-14
Are those constant blocks using hard-coded numerical values or are they variables (either numeric or Simulink.Parameter objects?)
Also, without knowing much about your model, I would maybe check your Inline Parameters settings?
- Sebastian
  2 个评论
Thomas Marullo
Thomas Marullo 2015-5-14
编辑:Thomas Marullo 2015-5-14
Thanks, Sebastian. I've checked the Inline Parameters, which I've never turned on. My model is a closed loop system. The constant blocks use scalar/double variables as the value for the Constant block.
I've attached a screenshot of the model in external mode. I highlighted the block property of two constant blocks. The EQSCaleFactor one is a scalar/double value, (ie. 0.923). The Structure.P0 is a vector double 1x134. Structure.P0 is tunable whereas Integrator.EQScaleFactor isn't. I can't understand why.
Again, no Inline Parameters setting have ever been enabled.
Sebastian Castro
Sebastian Castro 2015-5-14
Strange... so both "Structure" and "Integrator" are MATLAB structures, then?
Which of those blocks in your screenshot are the constant blocks in question, and what do they feed into?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by