GWY-01-PBS-01
62
5
5.5.3 Example
3:
Fragmentation of Responses
For this example, the Master will send a CBx “Read Tag Data” command to the Slave (the
RFID Controller) to read 50 bytes from a tag.
We will assume for this example that the both the input and output buffers have been
configured to 32 bytes each. This means that the controllers response to the tag read
command cannot completely fit in the input buffer, and the response will be “
fragmented
” or
sent in multiple fragments.
Sending the command:
In
Byte 2
of the output buffer, the Master places the length (in bytes) of the data packet (CBx
Command) we are sending. In this case the CBx command we are sending is 12 bytes. This
length is the length of the command bytes we are interested in sending, not the full size of
the buffer. The length also does not include the “Data Consistency Byte” at the end of the
buffer. That is just a mirror of the Control Byte.
In Byte 3
through
Byte 14
the Master places the 12 bytes of this particular CBx command.
Some CBx commands are larger, but all will be at least 12 bytes, even if some of those 12
bytes are not actually used.
(See the
Green
changes below)
Output Buffer
Input Buffer
Byte # Value
Byte # Value
00:
80
Output Buffer Control Byte
(OBCB)
7 6 5 4 3 2 1 0
[1] [0] [0] [0] [0] [0] [0] [0]
00
80
Input Buffer Control Byte
(IBCB)
7 6 5 4 3 2 1 0
[1] [0] [0] [0] [0] [0] [0] [0]
01: 00 (Always
0)
01: 00
02:
0C
(Packet length in bytes)
02: 00
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
..
30:
00
06
AA
05
00
01
03
E8
00
00
00
32
00
00
00
00
00
00
..
00
(CBx Command word length MSB)
(CBx Command word length LSB)
Minimum of 6 words
(CBx Command Type)
Always AA
(CBx Command Opcode)
0x05 = Read Tag Data
(CBx Command, byte not used)
(CBx Command “Node ID”)
(CBx Command Timeout MSB)
(CBx Command Timeout LSB)
0xE8 = 1000 ms timeout
(CBx Command Start Address MSB)
(CBx Command Start Address LSB)
address 0
(CBx Command Length MSB)
(CBx Command Length LSB)
50 bytes
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
..
30:
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
..
00
31: 80
Data Consistency Byte (OBDCB)
31: 80
Data Consistency Byte (IBDCB)
Summary of Contents for GWY-01-PBS-01
Page 1: ...GWY 01 PBS 01 Reference Manual ...
Page 5: ...v C ASCII CHART 92 ...
Page 101: ...www automation datalogic com ...