Simulink real time live data transfer from target machine to host PC R2018a

조회 수: 1 (최근 30일)
Hello there,
I would like to ask about Simulink Real Time controlling SpeedGoat target machine.
I need to transfer during execution 1 s of signal data to my host PC to do some calculations. I want to use host PC because it would otherwise overloaded target machine or some functions are not supported for code generation.
I can already send data from target machine to Host PC after the execution terminates. But I prefer to send it during execution.
I tried to use this example which would be perfect if it works in External mode for Target machine.
Unfortunately, function assignin is not supported for code generation and even plotting data in real time does not work.
Other way would be to use some script to save certain sequence of data from Simulink Data Inspector.
Is there any way which I am missing?
I would really appreciate any ideas how to do that.
Thanks a lot
Michael

채택된 답변

Michael Valasek
Michael Valasek 2019년 3월 15일
Problem solved by this link:
this three lines works!
runIDs = Simulink.sdi.getAllRunIDs;
runID = runIDs(end);
Dataset = Simulink.sdi.exportRun(runID);
thank you

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Vehicle Network Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by