Caution
If this COMMREQ is sent when a Write Bytes
(4401) COMMREQ is transmitting a string from a
serial port, transmission is halted. The position
within the string where the transmission is halted is
indeterminate. In addition, the final character
received by the device the CPU is sending to is also
indeterminate.
12.4.5
Set Up Input Buffer Function (4301)
This function can be used to change the size of the internal memory buffer where input
data will be placed as it is received. By default, the buffer is set to a maximum of 2K
bytes. As data is received from the serial port it is placed in the input buffer. If the buffer
becomes full, any additional data received from the serial port is discarded and the
Overflow Error bit in the Port Status word (See Read Port Status Function) is set.
12.4.5.1
Retrieving Data from the Buffer
Data can be retrieved from the buffer using the Read String or Read Bytes function. It is
not directly accessible from the application program.
If data is not retrieved from the buffer in a timely fashion, some characters may be lost.
12.4.5.2
Example Command Block for the Set Up Input Buffer
Function
VALUE
(decimal)
VALUE
(hexadecimal)
MEANING
address
0002
0002
Data block length
a1
0000
0000
NOWAIT mode
a2
0008
0008
Status word memory type (%R)
a3
0000
0000
Status word address minus 1 (%R0001)
a4
0000
0000
Not used
a5
0000
0000
Not used
a6
4301
10CD
Setup input buffer command
a7
0064
0040
Buffer length (in words)
12.4.5.3
Operating Notes
It is not possible to set the buffer length to zero. If zero is entered as the buffer length, the
buffer size will be set to the 2K bytes default.
If a length greater than 2K bytes is specified, an error is generated.
12.4.6
Flush Input Buffer Function (4302)
This operation empties the input buffer of any characters received through the serial port
but not yet retrieved using a read command. All such characters are lost.
238
GFK-1503E
VersaMax PLC User Manual
For public disclosure
Summary of Contents for VersaMax PLC
Page 16: ...Notes 16 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 38: ...Notes 38 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 50: ...Notes 50 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 92: ...Notes 92 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 112: ...Notes 112 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 224: ...Notes 224 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 292: ...Notes 292 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 316: ...Notes 316 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 317: ......