Effacer les filtres
Effacer les filtres

Custom library within another custom library

1 vue (au cours des 30 derniers jours)
Bjoern
Bjoern le 22 Juin 2012
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.

Réponse acceptée

TAB
TAB le 23 Juin 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() .

Plus de réponses (0)

Catégories

En savoir plus sur Event Functions dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by