- Create a simple System object with getIconImpl that defines the icon based on a Logical property value.
- Create a Simulink library and add MATLAB System block
- Create a subsystem from the block and create mask
- In Mask, promote checkbox parameter from System block
- In new model, drag block from library
- Open block dialog and look under mask
- The System block icon stays the same even when toggling and applying the new checkbox value on the dialog.
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
2016-7-25
I think I have reproduced this issue but would like to confirm the steps with you:
Does this capture your basic workflow?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!