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

1 view (last 30 days)
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

Accepted Answer

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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!