Binary command language appendix a, Command block – Rockwell Automation 1775-S5_SR5,D17756.5.5 User Manual PLC-3 FAMILY I/0 User Manual

Page 135

Advertising
background image

Binary Command Language

Appendix A

A-7

Command Block

With the exception of the CCR, all commands sent from the master to the
scanner are in the form of a command block. The command is always
structured as follows:

Command Data

Command

Command

ETX

Checksum

STX

(02)

Command

Block Seq

Count

Buffer Size

(03)

command buffer

Command:

Description:

STX (start of text)

the first byte of the control block (02 hex).

Command block sequence count

Command block sequence count (0 to 7F hex)

Command buffer size

Number of bytes to follow in the command buffer. The

buffer includes all bytes between this buffer size byte and

the ETX.

Command

The fourth byte in the command block contains the hex

code corresponding to the desired command.

Command data

The command data contains all parameters associated

with the indicated command. When the command data

contains data in word format, the lower byte must be sent

first.

Important:

The master can send multiple

commands in one command buffer by including another

command and command data after the previous one.

Each command must have all necessary parameters and

the entire command block cannot be larger than the

scanner is capable of receiving. This maximum size

should be one less than is reported in a CCR response.

One word is reserved for scanner use.

ETX (End of text)

Following the command buffer is the ETX code (03 hex).

Checksum

The last byte is a checksum which is the sum of all

previous bytes from the STX (02) through ETX (03)

inclusively.

Advertising