How to get the data from the RS 232?

조회 수: 10 (최근 30일)
Changwoo Lee
Changwoo Lee 2022년 1월 26일
편집: Shivam Lahoti 2023년 11월 10일
I have a RS232 that connected to the Computer at COM 1.
Then, I want to recieve the data from the RS 232 in real-time.
Using the below simulink blocks, is it possible to recieve the data?
Host Serial Setup:
Host Serial Receive:
In more detail,
"Host Serial Receive" requires the information on "pakage header, pakage terminator, sample time", as follows:
What is the proper value setting for the RS 232?

답변 (1개)

Shivam Lahoti
Shivam Lahoti 2023년 11월 10일
편집: Shivam Lahoti 2023년 11월 10일
Hi Changwoo Lee,
Based on your description, you have an RS232 connection established between your computer and Com1, and you wish to receive real-time data. You are uncertain about using the Host Serial Receive block for this purpose.
Receiving data in real time through serial connections, specifically RS232, is indeed possible. The documentation mentioned below provides information about the feasibility of using the Host Serial Receive block for this task.
To establish communication and configure the receiver block, please refer to the provided answer as an example. You can use it as a starting point and adapt it to suit your specific use case and requirements. The answer’s zip file contains a pdf file talking in detail about different configurations for simple read block.
I hope this was helpful.
Regards,
Shivam Lahoti.

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by