Realtime data from 'To workspace' block

1 回表示 (過去 30 日間)
Osama Al-Najjar
Osama Al-Najjar 2018 年 10 月 11 日
コメント済み: Osama Al-Najjar 2018 年 10 月 24 日
Greetings,
I am facing the following problem, I have a model which generates an array of cells (1x80000), this array is fed from multiple variables using a signal mux during the simulation, example:(Temp, Actuator Status,SensorReadings....).
I am interested to send data to my SQL server each time step (during the simulation ); therefore, I tried to use the 'To workspace' block which i thought it will do the job, only to notice that it makes the data only available AFTER the simulation is over which kills the real time diagnostics that is running on the SQL server. Any idea how to extract data from simulink in real-time, if applicable taken from the 'to workspace' block ?
Did some research and found this: https://de.mathworks.com/help/simulink/ug/accessing-block-data-during-simulation.html
But it is not really clear how to solve the issue in my case when dealing with this array of cells.
Your help is much appreciated.

回答 (1 件)

Haritha
Haritha 2018 年 10 月 24 日
Hi,
You can create a call back function for the Simulink model automatically variables will save in workspace
  1 件のコメント
Osama Al-Najjar
Osama Al-Najjar 2018 年 10 月 24 日
thank you for your reply,
is it possible for you to give me a simple example ?
thanks

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDevelopment Computer Setup についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by