MATLAB: Using a Library linked Subsystem twice in a model with different Parameter-Settings

library lib subsystem different parameterssimulink

Like described above… The library-Subsystem has some Constant-Blocks with fixed Parameter-Names to define Parameters by the Workspace. A second copy of the Library-Subsystem in the same Modell should get a different set of Parameters. How to do?

Best Answer

You need to make that library-Subsystem a masked subsystem. Bring that parameter for the Constant block to the mask interface as a mask parameter. Then you can use the same library block multiple times with different parameter values.
See the document link:
web(fullfile(docroot, 'simulink/ug/mask-a-subsystem.html'))