Accesing simulink data in Realtime

Hi ,
Does anybody know how one can access the Simulink data in realtime?
I need to access data coming out of a simulink block and use it as a limit in a completely different model. To Workspace does not serve the purpose as data gets collected there only after the simulation ends.
Any other way?

 채택된 답변

Arnaud Miege
Arnaud Miege 2011년 6월 20일

0 개 추천

Use Model Reference to include your second model in the first one, and pass the signal of interest as an input to the second model.
HTH,
Arnaud

댓글 수: 5

aravindpma
aravindpma 2011년 6월 20일
Hi Arnaud,
Thanks for the reply, but the problems are :
1) The second model does not need this as an input, but is used as a limiting paramter.
2)The second model is not a Simulink model, though it can read data from m-files.
Hence, the best way I thought was to collect and store the simulink data in realtime and feed it as a bound(upper limit) to the second non-simulink model.
Thanks,
PM
Arnaud Miege
Arnaud Miege 2011년 6월 20일
What do you mean by a non-Simulink model? Do you mean MATLAB code?
aravindpma
aravindpma 2011년 6월 20일
No, its a different toolbox, which can be integrated to simulink. Its an internal toolbox for predictive control, but runs in the matlab/simulink environment.
Arnaud Miege
Arnaud Miege 2011년 6월 20일
OK, but it's a piece of MATLAB code, right? If so, you need to create a run-time object for the block. See the doc for more details:
http://www.mathworks.com/help/releases/R2011a/toolbox/simulink/ug/f13-92122.html
aravindpma
aravindpma 2011년 6월 20일
Yes, its matlab code.
Thanks for the link, I feel this will help.
Hope I can learn to use this :).
Thank you,
PM

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

태그

Community Treasure Hunt

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

Start Hunting!

Translated by