Observe state variable in Simulink executable in real-time

2 views (last 30 days)
I have a Simulink model which I compile and deploy onto a Raspberry Pi. I would like to access/observe a state variable in the model while the executable is running i.e. in real-time. Any suggestions on how I can do this?
One idea would be to continuously write the variable to a text file from within the executable, and subsequently read the file from the outside e.g. by means of a Python script - but I'm sure there is a more elegant solution.
Finally, I considered writing to a specific memory address from within the executable, and reading from this address from the outside, but that would be quite error prone I suppose.

Answers (0)

Categories

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!