Emerson PaCSystems VersaMax Series User Manual page 236

Table of Contents

Advertisement

User Manual
GFK-1503F
If insufficient characters are available to satisfy the request and a non-zero value is specified
for the number of characters to read, the status of the operation is not complete until either
sufficient characters have been received or the time-out interval expires. In either of those
conditions, the port status indicates the reason for completion of the read operation. The
status word is not updated until the read operation is complete (either due to timeout or
when all the data has been received).
If the time-out interval is set to zero, the COMMREQ remains pending until it has received
the requested amount of data, or until it is cancelled.
If this COMMREQ fails for any reason, no data is returned to the buffer. Any data that was
already in the buffer remains and can be retrieved with a subsequent read request.
Example Command Block for the Read Bytes Function
address
address +1
address +2
address +3
address +4
address +5
address +6
address +7
address +8
address +9
address +10
Return Data Format for the Read Bytes Function
The return data consists of the number of characters actually read, the number of characters
still available in the input buffer after the read is complete (if any), and the actual input
characters.
address
address +1
address +2
address +3
address +n
Operating Note
If the input data memory type parameter is specified to be a word memory type, and if an
odd number of bytes are actually received, then the high byte of the last word to be written
with the received data is set to zero.
Serial I/O / SNP / RTU Protocols
VALUE
VALUE
(decimal)
(hexadecimal
)
0005
0005
0000
0000
0008
0008
0000
0000
0000
0000
0000
0000
4402
1132
0030
001E
0005
0005
0008
0008
0100
0064
Number of characters actually read
Number of characters still available in the input buffer, if any
first two characters (first character is in the low byte)
third and fourth characters (third character is in the low byte)
subsequent characters
MEANING
Data block length
NOWAIT mode
Status word memory type (%R)
Status word address minus 1 (%R0001)
Not used
Not used
Read bytes command
Read time-out (30 seconds)
Number of bytes to read
Input data memory type (%R).
Input data memory address (%R0100)
Chapter 12
Jan 2020
222

Advertisement

Table of Contents
loading

Table of Contents