Executing callbacks of custom simulink blocks in a subsystem reference
13 views (last 30 days)
I have a custom Simulink block with a mask that executes callback on mask paramater changes and changes the underlying subsystem content (e.g. rename a signal)
When I want to use this block in a subsystem reference and I get the error:
- Error in 'XXX: Failed to evaluate mask initialization commands.
- Caused by:
Block 'XXX' is inside a Subsystem Reference block 'XXX'. Incorrect to modify contents of a Subsystem Reference block using callback code.
How can I fix it?
Thanks in advance!
Mark McBroom on 20 Feb 2021
I believe you need to put a mask on the subsystem reference and use this mask to pass values for each instance down into your custom simulink block mask that exists inside the subsystem reference.
This link contains instructions for creating a mask on the subsystem reference.