Logging data in concurrent execution using Simulink Real-Time stand-alone mode

1 view (last 30 days)
I want to run a Simulink model with Simulink Real-Time as a concurrent stand-alone application. Furthermore the results have to be logged to a file. So far I have learned that target file scopes will not work in this design. I wrote an S Function in C, but file I/O is to slow for my application which results in a CPU overload. Now I try to use a slower background task that writes all buffered data from the self-developed scopes into the logfile.
But I need a nice way to transfer the pointer of the scope buffer (hold in the DWork vector of the scope) to the write block.
A global variable will not work in normal Simulink mode using MEX-Files. Data store blocks will produce additional modelling overhead.
The only possible way I see so far is to transfer a pointer of a global dataset using a file, what seems to be a really nasty solution.
Is there a possibility I missed? Any help would be appreciated.

Answers (0)


Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!