Rockwell Automation 2755 Enhanced Decoder Series B User Manual
Page 270
16–5
PCCC Host Commands
Publication 2755-833
Read Current Bar Code Data
Bar code data is stored as a packet in the host buffer of the decoder at
address 100H to 3BFH. Each packet contains data from one read
operation. The maximum number of bytes in one packet is 704 bytes.
To read the current bar code data, send this command structure:
0
2
4
6
5
1
3
7
STS= 00
Host Buffer Address= 100H
TNS
High Byte
Low Byte
MSB
LSB
CMD= 01H
Size = n
Read Current Bar Code Data Command
00H
Each command can return up to 124 (7C Hex) bytes of data, which is
determined by the size byte (byte 6). The amount of data in the host
buffer is variable.
The size of the reply varies depending on how much data is in the
host buffer and the number of bytes specified in the size byte.
If the host buffer is empty, the reply is returned without data and a
status of 40H (no data in host buffer).
0
STS= 40H
TNS
High Byte
Low Byte
MSB
LSB
1
3
2
CMD Reply = 41H
Reply - No Data in Host Buffer
If the host buffer contains data
≤
the number of bytes specified in
the size byte, the reply returns all data and a status of 00H (no
errors).
0
5
STS= 00H
TNS
High Byte
Low Byte
MSB
LSB
1
3
2
4
Reply - All Data Returned in Host Buffer
Data
CMD Reply = 41H
If the host buffer contains more data than the number of bytes
specified in the size byte, the reply is returned with truncated data
and a status of 80H (data truncated).