unable to modify a simulink block
Show older comments
In matlab there exist a block called "LPV system". It's a mask and into it there are several other blocks (figure below). Now i need to add/remove some of these sub-blocks and modify it. I'm able to do it (there are no errors), but when i run the simulation every change i do is canceled and it works like i did nothing. How can i modify it? Thank you in advance

4 Comments
Paolo Panarese
on 27 Sep 2024
Hi Enrico,
thanks for your question. In Simulink, when you drag any block, you are actually dragging a "link" to the original block of the library. You can view the blocks inside the mask, but generally it is "protected". If you try to edit it, you will get a warning saying
"Changing parameters of a block within a link. These changes can later be discarded or propagated to the library"
If you really want to modify the library block, you need first to disable the Library Link. To do this:
- Right-click on the block
- from the context menu, select Library Link, and then select Disable Link

After doing that, yiu can check that the block link had been broken by looking in the bottom left corner where you will see a new icon: like a broken chain ring:

I recommend you also change the name of the block itself, to avoid blocks with different implementation having the same name.

Hope this helps.
Best regards,
Paolo
Enrico Falco
on 28 Sep 2024
Edited: Enrico Falco
on 28 Sep 2024
Abhaya
on 30 Sep 2024
Please check the 'code' section within the 'Edit mask' option of the block. I tried to comment out the function call responsible for updating the block. Although my changes within the blocks remain intact, some configurations within the block appear to be missing as a result.
Enrico Falco
on 30 Sep 2024
Answers (0)
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!