Issue creating my own personal version of variant subsystem

조회 수: 1 (최근 30일)
Claudio Rosso
Claudio Rosso 2024년 4월 3일
댓글: Claudio Rosso 2024년 4월 4일
I have created a custom library with all the most used blocks from the simulink library to have them already customized for my specific usage.
I have a problem with the variant subsystem: it works fine usually, until i use some data from a dictionary linked to one subsystem from library. In that case i obtain this kind of error:
Simulink.DataType object 'FloatData' is not in scope from 'Bus'.
And the error raisedfrom the check is: "the type 'FloatData' has been deleted from the dctionary dd_Can_ld".
The data type is used by a Bus Creator to agglomerate data into a structure of the type defined into the dictionary.
Of course if i use the standard variant subsystem from simulink library it works correctly.
  댓글 수: 4
Fangjun Jiang
Fangjun Jiang 2024년 4월 3일
Create a new library, drag and drop a "Variant Subsystem" block from the Simulink library, name it as "MyVariantSubsystem", save the library as MyLibrary.
If you drag and drop "MyVariantSubsystem" block to a new model named "MyNewModel", do you notice that you can't make any changes inside the "MyVariantSubsystem" in "MyNewModel"? Are you aware that this is expected because "MyVariantSubsystem" is locked? I wonder if you problem has anything to do with this.
Anyway, it is hard to understand your problem without the actual model or an example. I suggest you contact the Mathworks tech support with your actual model.
Claudio Rosso
Claudio Rosso 2024년 4월 4일
Yes, I'm aware of that and i found a workaround to avoid that issue from the slcilib (Simulink Code Inspector Library) inserting some code into CopyFcn callback:
set_param(gcb,'LinkStatus','none');
set_param(gcb,'Mask','off');
set_param(gcb,'MaskType','');
set_param(gcb,'MaskDescription','');
set_param(gcb,'OpenFcn','');
set_param(gcb,'CopyFcn','').
Thank you for your time, i will ask Mathworks tech support for that.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by