Custom library within another custom library

1 view (last 30 days)
I'm trying to create a custom library (A) that uses another custom library (B). This seems rather problematic.
Background: Both (A) and (B) each have a masked parameter, ParA and ParB. When ParA is changed through the dialog its' callback changes the value of ParB; however, ParB's callback isn't executed. (Same thing when I programmatically change ParB: it's callback isn't executed). The net result being a non-expected behavior when trying to change ParB.
Basically: How do I make sure a mask parameter callback is executed after programmatically changing the value of that mask parameter?
Note: It's possible to have (A) change the internals of (B) (to perform callback-B's work) but since it's a library Simulink complains.

Accepted Answer

TAB
TAB on 23 Jun 2012
Parameter dialog callback is not executed when parameter value is changed programmatically using set_param() command. See the second box containing note here in the user guide.
Alternatively, you can write your callback code in Initialization Pane of the mask. Code in this pane will be executed every time when the parameter value is changed either from dialog box or programmatically using set_param() .

More Answers (0)

Categories

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