Chapter 6. Serial I/O, SNP & RTU Protocols224 PACSystems* RX7i, RX3i and RSTi-EP CPU Reference Manual GFK-2222AD6.2.15 Read String Function (4403)This function causes characters to be read from the specified port until a specified terminating characteris received. The characters are read from the internal input buffer and placed in the specified input dataarea.The function returns both the number of characters retrieved and the number of unprocessed charactersstill in the input buffer. If zero characters of input are requested, only the number of unprocessedcharacters in the input buffer is returned.If the terminating character is not in the input buffer, the status of the operation is not complete untileither the terminating character has been received or the time-out interval expires. In either of thoseconditions, the port status indicates the reason for completion of the read operation.If the time-out interval is set to zero, the COMMREQ remains pending until it has received the requestedstring, terminated by the specified end character.If this COMMREQ fails for any reason, no data is returned to the input data area. Any data that has notbeen read from the internal input buffer remains, and it can be retrieved with a subsequent read request.Example Command Block for the Read String FunctionValue(decimal)Value(hexadecimal) MeaningAddress 0005 0005 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 4403 1133 Read string commandAddress +7 0030 001E Read time-out (30 seconds)Address +8 0013 000D Terminating character (carriage return): must bebetween 0 and 255 (0xFF), inclusiveAddress +9 0008 0008 Input data memory type (%R)Address +10 0100 0064 Input data memory address (%R0100)