How to select a structure as a tunable parameter for a protected model?

6 visualizzazioni (ultimi 30 giorni)
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?

Risposte (1)

Alan
Alan il 5 Ago 2025
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.
  1. Follow the steps below to create a mask variable marked as a model argument: Create and Reference a Masked Model
  2. Then, convert the model reference to protected.
  3. Right click and select “Block Parameters” and add “.slxp” to the “Model name” field.
  4. 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

Prodotti


Release

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by