Rockwell Automation 2755 Enhanced Decoder Series B User Manual

Page 276

Advertising
background image

16–11

PCCC Host Commands

Publication 2755-833

Send Repeat Read Command

The Repeat Read command tells the decoder to wait for bar code
data. When data is available, the decoder sends it to a specific
address in host memory using the unprotected write (08H) command.
The host does not have to request data at each poll when a 2760-RB
is used (RB polls automatically). The decoder automatically sends
bar code data as it is decoded.

The command structure for sending a repeat read command is:

5

1

3

9

7

0

2

4

8

6

STS= 00

Command Address= 640H

TNS

High Byte

Low Byte

MSB

LSB

CMD= 08H

Size = n

Repeat Read Command

Repeat Count= n

Starting Target Host Address

Command Address

Bytes 4 and 5 contain address 640H. This address tells the
decoder to perform a repeat read command.

Target Host Address

Specifies the host address to which the decoder will send the read
reply data.

Size

Byte 8 specifies the maximum number of bytes sent to the host in
each read reply. The maximum size is 122 bytes.

Repeat Count

Byte 9 specifies the maximum number of bar code packets that
can be sent to the host. A value of 0 means the decoder can send
packets

until terminated by a “Cancel Repeat Read” command..

After the host sends the repeat read command, the decoder generates
an unprotected write command to send the bar code data to the host.

The decoder continues to send data to the host until the repeat count
is reached or until a Cancel Repeat command is sent to the decoder.

The amount of data returned in the read reply is determined by the
size parameter and the amount of data in the host buffer.

If the repeat count is non zero, the repeat count automatically
decrements by one and the repeat read command continues
processing. When the repeat count decrements to zero, the repeat
read command terminates.

Advertising