필터 지우기
필터 지우기

Why are Serial COM ports closed in Matlab and open on the PC

조회 수: 11 (최근 30일)
Harneel Singh Sagoo
Harneel Singh Sagoo 2014년 11월 19일
답변: Walter Roberson 2018년 3월 8일
This is the following Statement i get from Matlab after pressing "Verbinden"
>> versuchsstand
Serial Port Object : Serial-COM6
Communication Settings
Port: COM6
BaudRate: 57600
Terminator: 'LF'
Communication State
Status: closed
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
Serial Port Object : Serial-COM7
Communication Settings
Port: COM7
BaudRate: 115200
Terminator: 'LF'
Communication State
Status: closed
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 8
How can i Change the Status from Closed to Open, so that i can communicate with the connected devices.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 3월 8일
You need to serial() to configure the settings for the com port, and then you need to fopen() the resulting object, after which you can do I/O with it.

카테고리

Help CenterFile Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by