필터 지우기
필터 지우기

The created PIL block links automatically to COM5

조회 수: 10 (최근 30일)
Eduard Monlleo
Eduard Monlleo 2019년 2월 25일
답변: Antonin 2019년 2월 26일
I'm using the extension for C2000 from TI. Today I was trying to create a PIL block and the creation is done correctly but when I run the model it always says that the serial port is '\\.\COM5', even when in Configuration Parameters it is set to COM7 in generation model and also in the generated one. I've used two different models to try it and it was the same error. I also tried to restart MATLAB.
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
*** Program is running.
*** Disconnecting from target...
*** Terminating debug session...
*** LOAD & RUN DONE.
Failed to open serial port '\\.\COM5'. The reported error code is: 2 or 0x00000002. Possible causes are:
a) The target is not powered on.
b) The specified port number is not correct.
c) The specified bit rate is not supported by the host machine.
d) The previous connection was not closed correctly. If this is the case, you may need to re-start MATLAB.
Communications error: the communication channel could not be opened.

채택된 답변

Antonin
Antonin 2019년 2월 26일
Hi Eduard,
The COM settings you are referring to on the configuration parameters propably belong to External mode and not PIL.
For PIL, you can set the COM port by using the following command at the MATLAB prompt:
setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','COMPort','COM5');
Refer to the following example for details:
I hope it helps,
Cheers,
Antonin.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Software-in-the-Loop Simulation에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by