External Mode - Raspberry; re-connect
4 views (last 30 days)
Show older comments
Hello,
actually I’m working on a Simulink-Model, that collects temperatures from 1wire sensors and switches relays to control a heating / cooling system on an external system (Raspberry Pi ).
The start of Simulink, the external connection and the execution oft h code on the Raspberry PI work well.
Also the disconnection works well, without losing functionality on the raspberry-process.
The problem is, that it not possible for me to reconnect to the process on the Raspberry Pi, after Matlab/Simulink was closed and restarted. Trying to do that, the following error message appears:
"The model that you are trying to run in External mode does not match the application running on your target. Rebuild the model, run it on your target, and start External mode simulation again."
(see attached error message)
I didn‘t change the Simulink-Code in the meantime. Is a „reconnect“ to the raspberry-process after a restart of Matlab/Simulinkch in principal not possible or do I make a mistake? Greetings Rene
2 Comments
Thomas Lundberg
on 8 May 2020
Did you solve it Marek? If you did, would you like to share your solution?
BR Thomas
Answers (4)
shz
on 10 May 2017
I had the same problem You should kill the process that doesn't let to run your code. for that you can use command "openShell(mypi)" to open the RPi shell Then you can use command "kill pid" or "killall proc" to kill all of them and then try again
1 Comment
Franziska Schmierer
on 30 Oct 2017
Can I damage something that is installed at my Pi? Or does this mean that I only stopp all process at the PI?
Madhu Govindarajan
on 31 Oct 2017
Another way would be to open the shell as mentioned above and deleting the folders related to the specific model and re-run it. This has resolved the issue for me several times.
2 Comments
Liew Tian Chin
on 6 Apr 2018
The simulink model files usually located in /home/pi/.... Try ~$ ls /home/pi/ command. You should see your project files name, three of them all together. Deletes all of them. Then, re-run your model in external mode. Everything should work fine.
To deletes file, refer https://www.mathworks.com/help/supportpkg/raspberrypiio/ref/deletefile.html
Thomas Lundberg
on 8 May 2020
Hello Rene
About your mdl ( I’m working on a Simulink-Model, that collects temperatures from 1wire sensors and switches relays to control a heating / cooling system on an external system (Raspberry Pi )) Is it something you would like to share? I just started working on the same thing.
BR Thomas
0 Comments
See Also
Categories
Find more on General Applications in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!