How to select a structure as a tunable parameter for a protected model?
이전 댓글 표시
I create a structure in base workspace then use it to configure my simulink subsystem through mask, everything goes well. But once I protect the subsystem, the subsystem configuration remains unchanged even if the structure in base workspace is changed, and I cannot select the structure as the tunable parameter for the generated protected model, how can I solve this problem?
답변 (1개)
Alan
2025년 8월 5일
0 개 추천
Hello Haotian,
I assume you are providing a structure as a tunable parameter using the “Simulink.Bus” class. I am also not able to find tunable parameters while creating a protected model.
The following workflow is an alternate workflow I tried with Simulink R2025a and R2025a Update 1.
- Follow the steps below to create a mask variable marked as a model argument: Create and Reference a Masked Model
- Then, convert the model reference to protected.
- Right click and select “Block Parameters” and add “.slxp” to the “Model name” field.
- Set the mask, save the model and simulate it.
However, I was not able to edit the block parameters through the mask, even for variables of other data types, not just structures.
This could be a bug. The next step could be to reach out to MathWorks Technical support: Contact Support - MATLAB & Simulink
Regards,
Alan
카테고리
도움말 센터 및 File Exchange에서 Model References에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!