unable to modify a simulink block

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

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
Enrico Falco on 28 Sep 2024
Edited: Enrico Falco on 28 Sep 2024
Hello, i did everything u told me but unfortunately it keep doesnt work. For example if i simply apply into the subsystem (with Disabled Link) a scope like in the picture, when i run the simulation it simply disappear. :(
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.
i've solved by implementing it from scratch zz

Sign in to comment.

Answers (0)

Categories

Products

Release

R2023a

Asked:

on 26 Sep 2024

Commented:

on 30 Sep 2024

Community Treasure Hunt

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

Start Hunting!