Stateflow chart Sample time miss match
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I have encountered an issue with the Simulink file that I have attached below (Matlab 2023a). The error message states: "Error: Sample time 0 of 'Sim_Test/Chart/model' does not match the sample time [0, 1] of the Stateflow chart in which it is contained." I would greatly appreciate any assistance in resolving this problem. Thank you in advance for your help.
0 commentaires
Réponses (1)
Marcos
le 8 Déc 2023
Hello Saman,
I believe you're encountering this issue because there are some blocks (clock and derivative blocks) inside of the Simulink Based State "model" which are continuous time based. That's not allowed in charts containing events. As replacements, you could use the Digital Clock block and the Discrete Derivative block.
After replacing these blocks, you will probably run into model loop errors. At that point you can probably modify your design so that you have both charts combined into one chart having two top level states executed in Parallel ("Parallel" decomposition as opposed to "Exclusive"). You will probably need to convert your input/output events to local events to coordinate the communication between the two top level states. Moreover, you might have to change new_kappa scope to data store memory in order to access it inside of your Simulink based state.
0 commentaires
Voir également
Catégories
En savoir plus sur Sources dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!