An error occurs when using the REPLACE_BLOCK function in dynamic masking of a library block.
The reproduction steps are provided below:
Open the attached example "rate_lib.mdl" and copy this to a new Simulink model. Open the mask and change the 'Reset'. This results in an error dialog with the following message:
Error due to multiple causes: --> Inport block does not have a parameter name 'Value'. --> Error evaluating 'MaskCallback' callback for Ratelimiter block (mask) 'Ratelimiter2'. Inport block does not have a parameter named 'Value'.
Breaking the link resolves the error; however this is not a suitable workaround.
It is mentioned in the Help Documentation for "Mask Editor" (Mask Editor –> Parameters Pane –> Options for Selected Parameter Panel –> Callback) that changing the configuration of the subsystem in the mask parameter callback function is not recommended. So the REPLACE_BLOCK function should be done in mask initialization. However, this also does not work.
Best Answer