beautypg.com

Ack/nak, bcc characters, Block check character – Rockwell Automation 5370 CVIM Communications Manual User Manual

Page 98

background image

Chapter 5

Using the RS–232 Ports

5–28

After receiving a DF1 data packet, the CVIM module validates the Block
Check Character.

Note: The block check character is a technique used to check the integrity of
of data packet. BCC are explained in the next section.

Depending upon whether or not the BCC is validated, the following will
occur:

If the BCC is not acceptable, the CVIM module will reply with a DLE
NAK (Negative Acknowledgment) character and discard the data packet.

If the command has an acceptable BCC the CVIM module will reply with
a DLE ACK (Positive Acknowledgment) character and try to execute the
command.

After receiving a data packet and validating the BCC, one of the following
will occur.

If data packet has a valid BCC but the CVIM module cannot execute the
command the CVIM module will discard the data package. No message is
returned. The host should be set to time out after waiting for a response.

If the command can be executed, the CVIM module will respond with any
returned data packets.

After receiving the data, the host should respond with a DLE ACK to let the
CVIM module know that the message was received properly. If the host
returns a DLE NAK, the CVIM module will retransmit the data up to three
times before discarding the data packet.

Note: Some commands request a continuous flow of data from the CVIM
module. You can stop the flow of data by sending another command.

Note: A simple way to test the RS–232 links is to send the CVIM module a
DLE ENQ (enquiry). If you have the port properly connected and the CVIM
module is configured for RS–232, the CVIM module should send a DLE
ACK or DLE NAK in response. If no response is provided, check your
connections and CVIM module configuration.

The block check character (BCC) is a means of checking the accuracy of
each message packet transmission. It is the 2’s complement of the 8–bit sum
(modulo–256 arithmetic sum) of all data bytes between the DLE STX and
the DLE ETX BCC. It does not include any other message packet codes or
response codes.

ACK/NAK, BCC Characters

Block Check Character