X20 system modules • Other functions • X20CM4810
2188
X20 system User's Manual 3.10
First, the messages must be split into segments. In the default configuration, it is important to ensure that each
sequence can hold an entire segment, including the associated control byte. The sequence is limited to the size of
the enable MTU. In other words, a segment must be at least 1 byte smaller than the MTU.
MTU = 7 bytes → Max. segment length = 6 bytes
•
Message 1 (7 bytes)
➯
First segment = Control byte + 6 bytes of data
➯
Second segment = Control byte + 1 data byte
•
Message 2 (2 bytes)
➯
First segment = Control byte + 2 bytes of data
•
Message 3 (9 bytes)
➯
First segment = Control byte + 6 bytes of data
➯
Second segment = Control byte + 3 data bytes
•
No more messages
➯
C0 control byte
A unique control byte must be generated for each segment. In addition, the C0 control byte is generated to keep
communication on standby.
C0 (control byte 0)
C1 (control byte 1)
C2 (control byte 2)
- SegmentLength (0)
=
0 - SegmentLength (6)
=
6 - SegmentLength (1)
=
1
- nextCBPos (0)
=
0 - nextCBPos (0)
=
0 - nextCBPos (0)
=
0
- MessageEndBit (0)
=
0 - MessageEndBit (0)
=
0 - MessageEndBit (1)
=
128
Control byte
Σ
0 Control byte
Σ
6 Control byte
Σ
129
Table 767: FlatStream determination of the control bytes for the default configuration example (part 1)
C3 (control byte 3)
C4 (control byte 4)
C5 (control byte 5)
- SegmentLength (2)
=
2 - SegmentLength (6)
=
6 - SegmentLength (3)
=
3
- nextCBPos (0)
=
0 - nextCBPos (0)
=
0 - nextCBPos (0)
=
0
- MessageEndBit (1)
=
128 - MessageEndBit (0)
=
0 - MessageEndBit (1)
=
128
Control byte
Σ
130 Control byte
Σ
6 Control byte
Σ
131
Table 768: FlatStream determination of the control bytes for the default configuration example (part 2)
Transmitting data to a module (output)
When transmitting data, the transmit array must be generated in the application program. Sequences are then
transmitted one by one using FlatStream and received by the module.
Information:
Although all B&R modules with FlatStream communication always support the most compact trans-
missions in the output direction, it is recommended to use the same design for the transfer arrays in
both communication directions.
_data_01
_data_02
_data_03
_data_04
_data_05
_data_xx
. . .
TxBytes
When OutputMTU
released:
CPU fills
OutputMTU with
the next sequence
of the transmit array
Transmit array
Type: USINT
OutputMTU
Type: USINT
PLC / Bus controller
The transmit buffer
of the module is
adjusted cyclically to
OutputMTU via X2X
_data_01
_data_02
_data_03
_data_04
_data_05
_data_xx
. . .
*RxBytes
Module adds the transmit buffer
to the internal array
If successful:
InputSequenceAck is
adjusted to the
transmit counter
If the OutputSequence
counter is increased:
Module-internal
receive array
Type: USINT
Module-internal
receive buffer
Type: USINT
Module
Cyc.
Figure 725: FlatStream communication (output)
The length of the message is initially smaller than the OutputMTU. In this case, one sequence would be sufficient
to transmit the entire message and the necessary control byte.
Summary of Contents for X20 System
Page 2: ......