How to use Classic State Machine outputs in Simulink?

3 vues (au cours des 30 derniers jours)
Andrew Poissant
Andrew Poissant le 19 Déc 2018
Modifié(e) : madhan ravi le 20 Déc 2018
I created a classic State Machine using the StateFlow add-on to Simulink. I am able to input various parameters that are updated in my Simulink model, but I am unable to take the outputs of the State Machine and use it elsewhere in my Simulink file. I get an error saying 'UAV_SIM_MAIN_7_0/DECISION ENGINE1/DECISION ENGINE' updates persistent or state variables while computing outputs, therefore it cannot be used in an algebraic loop. However, it is in a loop with the following blocks. For more information, see Algebraic Loops with MATLAB Function and Stateflow Blocks.' I tried changing the State Machine type to a Moore Chart but it does not work with the setup I have with my current State Machine. Is there a way to modify my classic State Machine to allow for its outputs to be used elsewhere in my Simulink model?

Réponse acceptée

Andrew Poissant
Andrew Poissant le 20 Déc 2018
Modifié(e) : madhan ravi le 20 Déc 2018
After searching around much more I found that adding a memory block to the outputs sent to Simulink solves the issues.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Functions 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!

Translated by