Effacer les filtres
Effacer les filtres

Data exchange between a C-mex S-function and a function-call subsystem

2 vues (au cours des 30 derniers jours)
Borja Heriz
Borja Heriz le 17 Mai 2012
Hi,
I have a Simulink model in which several outputs from a S-Function are connected to a function-call subsystem, also called by the S-Function.
However, I am observing a data inconsistency because the function-call subsystem is executed with the default values of the S-Function outputs and not with the calculated ones inside the mdlOutputs S-Function method.
I think that function-call is executed before the S-Function updates its outputs. Is there any way of solving this?
Thanks,

Réponses (1)

Kaustubha Govind
Kaustubha Govind le 18 Mai 2012
Are the S-function outputs that act as the function-call subsystem inputs computed after the function-call is triggered? As explained here Simulink interrupts the S-function's output function as soon the function-call subsystem is called and returns to the remaining statements after the subsystem has executed. Perhaps you should trigger the function-call at the bottom of your mdlOutputs function?

Catégories

En savoir plus sur Schedule Model Components 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