I am trying to use a raspberry pi to run only a section of a Simulink model. It is now running in an external mode simulation on the raspberry pi but this runs all of the model on the hardware. I am trying to figure out the best way to have the hardware run a portion of the code and have this send information to a second Simulink simulation, and vice versa, in real time.
Some of what I have tried is saving to the base workspace from the external mode simulation but it seems like in external mode the Simulation can not save to the workspace in real time using a MATLAB function block with the assignin() function. Can you use the base workspace as a way to share values between the model on the hardware and the model on the computer as they are running?
I tried using a referenced model but it did not have external mode as a simulation mode. It did have PIL and SIL but with these there is an error that says the model is not derived from an ERT or GRT system target file. Can you run a referenced model in external mode on a raspberry pi?