"Atteming to override parameters inside a library link of ..." error even after setting 'maskselfmodifiable' property

45 views (last 30 days)
I have a model in Simulink (Matlab 2012a) that, depending on the parameters chosen by the user in the mask window, creates more blocks and connects them all or deletes blocks accordindly. To use that model as a library, it was only possible using the 'maskselfmodifiable' property. Otherwise I was getting the "Atteming to override parameters of ... inside a library link" error message. This library works fine. After some time I decided to include a "save to workspace" block to log some variables. This block is located in one of the subsystems that are added or deleted depending on the user choice. So, when I create an additional subsystem, the variable name of the "save to workspace" block remains the same and an error due to logging two signals with the same name pops up as soon as I run the simulation. To fix this, I'm executing the set_param function to change the variable name accordingly. All code is called from the initialization tab of the the library mask. What happens is that I'm now getting the error message "Atteming to override parameters of ... inside a library link", even though 'maskselfmodifiable' property is set. When typing the same command line "set_param(...)" in matlab workspace the variable name is changed! And I just get an warning message: "Warning: Overriding parameters of '...' which is inside a library link". Can someone please explain me how to make that work? I read several posts and in most of them they just say to set the 'maskselfmodifiable' property, which does not work here. PS: Everything works fine if the model is not a library or if the link is disabled.

Answers (1)

Ravi on 18 Oct 2017
Hi Fernando,
I'm facing similar issue. I would be interested to know if you were able to solve this problem.
  1 Comment
Ravi on 19 Oct 2017
I was able to address this issue. Instead of copying the subsystem under masked subsystem build a subsystem by adding blocks from simulink library. Issue Code: ([longname '/bitHistory1'] is a subsystem under masked subsystem)
add_block([longname '/bitHistory1'],[longname '/bitHistory2'],... 'Position',pos);
Modified code: add_block('built-in/Subsystem',thisBlock,... 'Position',pos); add_block('simulink/Sources/In1',[thisBlock '/newBit'],... 'Position',[15 108 45 122]); add_block('simulink/Logic and Bit Operations/Shift Arithmetic'... ,[thisBlock '/4'],'Position',[95 15 190 55],'Orientation','left');

Sign in to comment.


Find more on Modeling 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!