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

조회 수: 1 (최근 30일)
Timothy Koehler
Timothy Koehler 2016년 7월 23일
댓글: Jacob Halbrooks 2016년 7월 25일
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