getInputNamesImpl() uses stale data when System Object in library mask

1 次查看(过去 30 天)
Scenario:
Subsystem is created that contains 2 custom SystemObjects.
Subsystem has mask parameters that contain info that should be displayed on input/output ports (or icon) for the internal SystemObjects.
Information is correctly propagated for the subsystem until....
...I put it into a Simulink library. Now, when the library's default mask parameters differ from the Simulink model mask parameters (which will always be the case), the System Objects inside the mask in the model no longer get the correct information.
This appears to be a bug, as the behavior is very non-intuitive. There are other mask parameters that feed into the SystemObject which affect the actual functionality, and those are properly handled. It appears that getInputNamesImpl(), getOutputNamesImpl(), and getIconImpl() all do not properly get info from the operational model, but rather from stale data from the library.
  1 个评论
Jacob Halbrooks
Jacob Halbrooks 2016-7-25
I think I have reproduced this issue but would like to confirm the steps with you:
  1. Create a simple System object with getIconImpl that defines the icon based on a Logical property value.
  2. Create a Simulink library and add MATLAB System block
  3. Create a subsystem from the block and create mask
  4. In Mask, promote checkbox parameter from System block
  5. In new model, drag block from library
  6. Open block dialog and look under mask
  7. The System block icon stays the same even when toggling and applying the new checkbox value on the dialog.
Does this capture your basic workflow?

请先登录,再进行评论。

回答(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