Error using Texas Instrument control board , Error occurred while executing External Mode MEX-file 'ext_comm': Failed to connect to the target.

6 views (last 30 days)
Hi, I have a problem when trying to run my simulink code to texas instrument f28335 control card. It shows an error message like below
Error occurred while executing External Mode MEX-file 'ext_comm':
Failed to connect to the target. Possible reasons for the failure:
a) The target is not switched on.
b) The target is not connected to your host machine.
c) The application for the model is not running on the target. You might have clicked the Stop button. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.
Caused by:
An error occurred attempting to open an rtIOStream. More detail may be reported in the MATLAB command window
I have checked port number and switch on the device. But the problem still happen
Any suggestion for me? thank you very much
  1 Comment
satish kumar
satish kumar on 11 Sep 2019
hi jirada can you explain in detail how you solve the problem as i am also getting the same error. Thanks in advance.

Sign in to comment.

Accepted Answer

Priyank Sharma
Priyank Sharma on 15 May 2018
If you have already checked the three suggestions from the error message, the most probable cause of this error is that the first 3 numbers in the board's IP address do not match those from the host computer's IP address.
If you changed the board's IP address to match the host computer, be sure to update this information in the model's Configuration Parameters, under Code Generation->Interface, in the edit box for "MEX-file arguments".
To resolve the 'ext_comm' error, you can change the IP address of the board to match the first three numbers in the IP address of the host computer. Once you have logged in over a serial connection, you can use the the ifconfig/ipconfig command to change the static IP address.
Once you have done this, you should also make sure that you change the IP address in the model's Configuration Parameters, under Code Generation->Interface, in the "MEX-file arguments" box. Be sure to surround the IP address in this dialog box with single quotes, and try running the model in External mode again.
Hope this helps.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by