The second s-function only run at first step in multiple S-Functions cases
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Yixiao Wang
il 21 Set 2016
Risposto: Yixiao Wang
il 25 Set 2016
I am running a simulink model with 2 S-functions (more in the future), while it cannot gives a correct result. When using some printf in my codes, I found that the second s-function runs only at the first step, although the first s-function runs continuously each step. What makes me confused is that when run the two S-function separately, by using workspace for data transmission indirectly, it works. Thus, I think there should be some tricks about running a model where the s-function cooperating with each other. Could someone give me some hints about it?
In the attachment is my model with the two C-codes.
My problem is that my simulink model can only support one s-function running continuously with fixed step (0.001s). When connecting s-function to another, the second s-function runs only at the first step.
Thank you for your reading
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Debug and Analyze the Quality of S-Functions in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!