External Mode - Raspberry; re-connect

조회 수: 11 (최근 30일)
Rene Essink
Rene Essink 2017년 3월 24일
댓글: Thomas Lundberg 2020년 5월 8일
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
Marek Cherubin
Marek Cherubin 2017년 12월 7일
Hello Rene! sorry for little offtopic but I try to read 1wire (18B20) in RPi using simulink. Honestly I want to experiment with the same temp. control idea as described in your post above. I realized that there isn't 1wire block in raspberrypilib. Could you provide me with the information how did you managed the problem. regards, Marek
Thomas Lundberg
Thomas Lundberg 2020년 5월 8일
Did you solve it Marek? If you did, would you like to share your solution?
BR Thomas

댓글을 달려면 로그인하십시오.

답변 (4개)

tang
tang 2017년 4월 25일
I have the same problem. Does anyone solved it.

shz
shz 2017년 5월 10일
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
Franziska Schmierer
Franziska Schmierer 2017년 10월 30일
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
Madhu Govindarajan 2017년 10월 31일
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
Franziska Schmierer
Franziska Schmierer 2017년 11월 2일
I know how to open the Shell but than? How can I find the folders? Which command? Thanks.
Liew Tian Chin
Liew Tian Chin 2018년 4월 6일
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
Thomas Lundberg 2020년 5월 8일
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

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by