Rockwell Automation 1775-S5_SR5,D17756.5.5 User Manual PLC-3 FAMILY I/0 User Manual

Page 139

Advertising
background image

Binary Command Language

Appendix A

A-11

Communication

The scanner must supply an ACK or NAK within one character timeout
period of receiving a command block. As the slave on the link, the scanner
has until a response timeout occurs before issuing a response block.

If the scanner receives a command block correctly, it responds with an
ACK code (06 hex) and increments the command block sequence count.
The master also increments the command block sequence count and resets
the error count at this time.

If the scanner detects an error in the command block which it receives, it
responds with a NAK code (15 hex). Some typical reasons for sending a
NAK are as follows:

received invalid command block sequence count
unexpected command block
unable to handle command block at this time
character timeout value exceeded

The master stops transmitting within one-half of the character timeout
period after receiving the NAK code. The master increments its error
count and:

If the error count is:

The master:

less than three

retransamits the block after one character timeout period.

three

stops trying to transmit the block.

If the master does not receive an ACK or NAK code within one character
timeout period after transmitting the command block, it continues as
though it received a NAK.

Handshaking

After receiving a response block from the scanner the master responds
within a character timeout period with one of these codes:

If you see:

It means that:

ACK (06 hex)

the command block was received correctly and that normal

communication is to continue.

NAK (15 hex)

an error was detected in the response block and instructs the scanner to

retransmit the block. The scanner tries three times before terminating

communication.

SO (0E hex)

shift out

the master needs time to process the response, and instructs the scanner

to wait. The scanner must wait for the master to send a shift in character

(0F hex) before continuing communication. A shift in character indicates

that the master is ready to continue communication.

Advertising