Is it possible to access local data from a chart in a simulink state?

4 ビュー (過去 30 日間)
Jonathan Hamm
Jonathan Hamm 2018 年 9 月 19 日
回答済み: Akshat Dalal 2025 年 3 月 2 日
I use a Mealy Chart and want to store a value within the chart for later use. I've set the data type to 'local data'. Now I want to access the data in a Simulink State but I've no idea, which Simulink block I have to use.
I can't just use a Data Store Memory because the Machine Type Mealy disallows it.
Edit: My current workaround is, to write the data to an output and pass it in to an input because I can acces inports and outports from a simulink state. To get it working I still have to use a delay between the output und input. It works, but it's not pretty and I have to add some stuff outside the chart.

回答 (1 件)

Akshat Dalal
Akshat Dalal 2025 年 3 月 2 日
Hi Jonathan,
Yes, it is possible to access data stores from stateflow charts. Please refer to the following documentation for more information: https://www.mathworks.com/help/stateflow/ug/access-data-store-memory-from-a-chart.html

カテゴリ

Help Center および File ExchangeSimulation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by