Chapter 6. Serial I/O, SNP & RTU ProtocolsGFK-2222AD April 2018 2156.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 beenreceived or the specified time-out has elapsed.2. A write request was initiated previously and transmission of the specified number of characters iscomplete or a time-out has elapsed.The status returned by the function indicates the event or events that have completed. More than onecondition can occur simultaneously, if both a read and a write were initiated previously.Example Command Block for the Read Port Status FunctionVALUE(decimal)VALUE(hexadecimal)MEANINGAddress 0003 0003 Data block lengthAddress +1 0000 0000 NOWAIT modeAddress +2 0008 0008 Status word memory type (%R)Address +3 0000 0000 Status word address minus 1 (%R0001)Address +4 0000 0000 Not usedAddress +5 0000 0000 Not usedAddress +6 4303 10CF Read port status commandAddress +7 0076 004C Port status memory type (%M)Address +8 0101 0065 Port status memory offset (%M101)Port StatusThe port status consists of a status word and the number of characters in the input buffer that have notbeen retrieved by the application (characters which have been received and are available).word 1 Port status word (see below)word 2 Characters available in the input buffer