7 - 37
7 Serial Communications
NX-series Communications Interface Units User’s Manual (W540)
7-8 Communications Performance
7
7-8-3 Processing When the Send Buffer or Receive Buffer Becomes Full
If the transfer time from the CPU Unit or communications master to the CIF Unit is shorter than the
transfer time from the CIF Unit to the serial line when data is sent, the send data may accumulate in the
send buffer.
If the transfer time from the serial line to
the CIF
Unit is shorter than the transfer time from the CIF Unit
to the CPU Unit or communications master when data is received, the receive data may accumulate in
the receive buffer.
The send buffer and receive buffer each has a capacity o
f
5,120 bytes. The CIF Unit performs the fol-
lowing processing if the send buffer or receive buffer becomes full.
If more than 4,097 bytes accumulate in the send or re
ceive buffer (capacity of 5,120 bytes each) when
data is sent or received, the Send Buffer Full Flag or the Receive Buffer Full Flag in the Port Status for
the relevant port changes to TRUE. Monitor the Send Buffer Full Flag and Receive Buffer Full Flag in
user programming and do not allow the buffers to become full. Or, adjust the divided data sizes so that
the buffers do not become full.
After the Send Buffer Full Flag or
Rec
eive Buffer Full Flag changes to TRUE, it will return to FALSE
when the amount of data in the send or receive buffer declines to 511 bytes or less.
Refer to A-3 List of NX Objects on pa
ge A-5 for details on the Send Buffer Full Flag and Receive Buffer
Full Flag.
The following figure illustrates the relationship between the amount of data in the send buffer
or receive
buffer and the value of the Send Buffer Full Flag or Receive Buffer Full Flag.
7-8-3 Processing When the Send Buffer or Receive Buffer Becomes
Full
Problem Processing
Send buffer
be
comes full.
• Any new send data from the CPU Unit or communications master is discarded until the
data in the send buffer goes below 5,120 bytes.
• When send data is discarded, a Data Discarded Due to Full Internal Buffer event (event
co
de 854
00000 hex) is recorded in the event log.
Receive buffer
becomes full.
• Any new receive data from the serial line is discarded until the data in the receive buffer
goes below 5,120 bytes.
• When receive data is discarded, a Data Discarded Due
to Full Internal Buffer event (event
code 85400000 hex) is recorded in the event log.
Send Buffer Full Flag and Receive Buffer Full Flag
Send Buffer Full Flag and
Receive Buffer Full Flag
Amount of data in the send
buffer or receive buffer [bytes]
The Send Buffer Full Flag
or Receive Buffer Full
Flag changes to TRUE.
A Data Discarded Due to Full Internal Buffer event is
registered in event log.
New data is discarded until the amount of data is
reduced to less than 5,120 bytes.
4,0975110
FALSE
TRUE
5,120
The Send Buffer Full Flag
or Receive Buffer Full Flag
returns to FALSE.