Differences between reading and reading ports in RS232 serial communication

Source: Internet
Author: User

In industrial control, there are two ways to read the status of the lower computer, one is the read port, for example, usingC LanguageInport () function. One is to use components, Microsoft's API-readfile (), and third-party controls. Reading the serial port can also read the status of the lower machine, while reading the port can also read the status of the lower machine. What is the difference?

1: inport can only read 8-bit register data, and readfile () can read many strings.

2: The storage method is different, and the speed is also different. Inport is real-time data, which is much faster than readfile but smaller in size.

 

In addition, you should pay attention to one problem during serial communication. If the receiving end processes faster or equal than the sending end, there is no limit, because the sending will be immediately charged. If the processing speed of the receiving end is slower than that of the sending end, a protocol is required. When the buffer zone is full, the sending end suspends the sending.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.