Instruction manual

Connection box C-BOX 300
The C-BOX PROFIBUS protocol implementation
S
ubject to reasonable modifications due to technical advances. Copyright Pepperl+Fuchs, Printed in Germany
Pepperl+Fuchs Group • Tel.: Germany (06 21) 7 76-0 • USA (330) 4 25 35 55 • Singapore 7 79 90 91 • Internet http://www.pepperl-fuchs.com
Date od issue 07/25/2003
29
5.5.4 Fragmentation and reassembling
When application data cannot be contained into the related Exchange Area buffer, a
fragmentation process should be activated. This is always done at the C-BOX side.
C-BOX is not able to manage application buffers longer than 256 bytes (this is true
both when it fragments and when it reassembles).
The fragmentation process is initiated by setting the More Bit (bit 3) of the related
buffer to 1. All the following fragments different from the last one still have the More
Bit set to 1. Finally, the last fragment is recognized since the More Bit is set to 0. It
must be noted that bit 0 and bit 1 must be independently managed for any fragment.
The receiver station may reassemble the entire data only after the last fragment has
arrived (the More Bit becomes 0).
Finally it must be noted that only the last fragment may have the Length Field different
from Max(In/Out)Bytes-4.
So if n fragments have been used, the length of the reassembled data is:
Figure 5.7 and Figure 5.8 show how the Control Byte changes in two different
examples of the fragmentation process. Note how the More Bit changes and the
correlation between fragment and the normal handshake mechanism.
Figure 5.7 Master sends data packets, Slave receives and acknowledges
Figure 5.8 Slave sends data packets, Master receives and acknowledges:
Application programs use the fragmentation capability only for slave --> master flow
even though Fragmentation/Reassembling is already implemented in the DPD layer
at the C-BOX for the opposite flow. New application programs can be developed
which activate this capability for master->slave flow. The use of SAP = 2 is an
example of the combined use of fragmentation and SAP features.
( n-1)*(Max(In/Out)Bytes-4) + Length Field(of the last fragment)
pg
piece 1
(first)
time
ack
piece 1
piece 2
ack
piece 2
piece 3
(last)
ack
piece 3
OUT[0] 0 x 00 0 x 0a
0 x 00
IN[0]
0 x 02
0 x 08
0 x 00
0 x 02
0 x 02
pg
time
piece 1
(first)
ack
piece 1
piece 2
ack
piece 2
ack
piece 3
piece 3
(last)
OUT[0] 0 x 00 0 x 00
0 x 00
IN[0]
0 x 09
0 x 01
0 x 08
0 x 00
0 x 01
0 x 01