How do I make Configurable Subsystem callbacks access base workspace variables in R2013b?
1 view (last 30 days)
Show older comments
My model uses a configurable subsystem to select a set of conditions for a specific simulation. Each block choice is an empty subsystem whose InitFcn callback runs a script which sets the values of some base workspace variables.
This has been working fine on releases up to and including R2010b but no longer works on R2013b. It fails stating that referenced (base workspace) variables do not exist.
If I stop the script at a breakpoint the workspace shows as empty at that point. If I kill the debug the workspace variables reappear. If I run the script from the command line it works correctly. If, instead of invoking a script from InitFcn, I place the content of the script directly into the InitFcn callback panel of block properties, it works correctly.
It appears as though the script is given its own function workspace if it is called by name from the InitFcn callback.
Does R2013b require some additional configuration that R2010b doesn't?
0 Comments
Answers (0)
See Also
Categories
Find more on Model, Block, and Port Callbacks in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!