Chapter 6. Serial I/O, SNP & RTU Protocols
GFK-2222AD April 2018 215
6.2.9 Read Port Status Function (4303)
This function returns the current status of the port. The following events can be detected:
1. A read request was initiated previously and the required number of characters has now been
received or the specified time-out has elapsed.
2. A write request was initiated previously and transmission of the specified number of characters is
complete or a time-out has elapsed.
The status returned by the function indicates the event or events that have completed. More than one
condition can occur simultaneously, if both a read and a write were initiated previously.
Example Command Block for the Read Port Status Function
Port Status
The port status consists of a status word and the number of characters in the input buffer that have not
been retrieved by the application (characters which have been received and are available).