필터 지우기
필터 지우기

Error occurred while executing external mode mex-file 'ext_comm': timed-out waiting for second connect response packet when using Simulink raspberry pi support package.

조회 수: 3 (최근 30일)
Hi
I am trying to get information about the encoder on the motor by using Simulink raspberry pi support package, my raspberry pi version is 4B
Here is my Simulink program:
The following are the settings of my encoder block:
I use Monitor and tune button to run the program on Rpi 4B , but when the code is uploaded to the board, it gets stuck in the initialization part, and then I get the following error message:
"Error occurred while executing external mode mex-file 'ext_comm': timed-out waiting for second connect response packet"
I was looking for a solution to a similar problem in the forums, and there were people who mentioned baud rate modification, but I didn't find any baud rate modification method in my hardware settings section:
How can I fix this error? Any help will be pretty much appreciated.
Thanks in advance.
  댓글 수: 2
Nirmalkumar Doreraju
Nirmalkumar Doreraju 2022년 3월 3일
Hi Tian,
The problem mentioned happens only for Encoder blocks or does it happen even when you run a simple model like 'raspberrypi_gettingstarted' in 'Monitor & Tune'?
Regards,
Nirmal
Tian Bao Chiu
Tian Bao Chiu 2022년 3월 3일
편집: Tian Bao Chiu 2022년 3월 3일
Hi Nirmal,
Other example programs can work normally, such as "raspberrypi_gettingstarted", as long as there are no Encoder blocks in the program, they can run normally on the Raspberry Pi 4B, but as long as the Encoder blocks are added, the error content:"Error occurred while executing external mode mex-file 'ext_comm': timed-out waiting for second connect response packet" will appear.

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

답변 (1개)

Chetan
Chetan 2023년 9월 15일
It seems that you're encountering an error with Raspberry Pi in external mode.
To resolve this issue, I recommend trying the following steps:
Change the baud rate by using the following command:
codertarget.arduinobase.registry.setBaudRate(gcr,*nomberofBaudRate)
For more detailed instructions on changing the baud rate for the boards, you can refer to the following articles:
I hope these suggestions help you resolve the issue you are facing.

카테고리

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

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by