Ack/nak protocol – Rockwell Automation 2755-G6-D Scanner with RS-232 Option User Manual

Page 81

Advertising
background image

Serial Commands

Chapter 9

9–3

The scanner provides ACK/NAK protocol during
serial programming to provide feedback to the host
computer which is programming the scanner.

ACK/NAK protocol provides two functions.

It provides the host with positive acknowledge-
ment that its commands are being accepted and
acted upon.

It ensures the host will not issue commands to the
scanner faster than the scanner can process them.

For example, every time the scanner receives a
correct command, it modifies its internal EEPROM, a
function that takes about one second. At 9600 baud,
the host can easily issue commands to the scanner
faster than they can be processed.

If, after issuing each command, the host waits to
receive an ACK or NAK code before issuing the next
command the scanner cannot be overrun.

If XON/XOFF or CTS/RTS protocol is being used,
the scanner cannot be overrun by programming
commands. However, the host is not provided with
feedback as to the outcome of its commands.

The ACK/NAK Protocol is quite simple. Whenever
the scanner receives a correctly formatted command,
it sends a confirmation message followed by an ACK
(06H) code. The following example shows the com-
mand and response for the BEEPER OFF command.

BEEPER OFF CR–LF ACK

Command from Host:

STX ESC AA ETX

Response from Scanner:

If the scanner receives an unknown command or
improperly formatted command, or if the required
parameters are missing or out-of-range, it sends a
NAK (15H) code.

ACK/NAK
Protocol

Advertising
This manual is related to the following products: