External mode data logging XCP/Serial COM port issue with Windows OS

31 views (last 30 days)
After connecting hardware board over virtual COM port I see in the Windows OS -> Device Manager dialog, that COM7 was used.  I set the same COM port in the Simulink Configuration dialog correctly and starting [Monitor & Tune] from the Simulink editor toolstrip menu and get this error:
action: EXT_INIT
Creating Target Handler (XCP on Serial)...
Build directory: C:\matlab\mytest_ert_rtw
Serial Port Name: COM10
Baud Rate: 5000000
action: EXT_CONNECT
Connection to the target...
CAUSED by:
* External Mode Open Protocol Connect Command failed
"...Could not connect to XCP slave: XCP master serial port error: open:
The system cannot find the file specified
Unable to connect to the hardware target...
It seems that the wrong port was used for hardware connection during Simulink build process.
 

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 23 Apr 2021
Edited: MathWorks Support Team on 23 Apr 2021
It seems that the COM port setting was not adopted correctly by the system.  You can try to fix it by doing the following steps:
1.
Push [refresh] the COM Port and set preference once again to the correct COM port from Windows Device Manager UI e.g. COM7
2.
You can also change manually the COM port number in the Windows OS -> Device Manager from e.g. COM7 to COM10
3.
If the issue or conflict still exists please check which COM ports are in use on Windows OS.
Show hidden COM ports and uninstall / delete them if necessary.
Alternative use Powershell script to get all used COM ports.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!