Devicenet data details, Sending data through the ascii modules, Receiving data from the ascii modules – Rockwell Automation 1734-485ASC POINT I/O ASCII User Manual User Manual

Page 63

Advertising
background image

Publication 1734-UM009B-EN-P - July 2003

Using the ASCII Modules with the ControlLogix System Application Examples B-3

DeviceNet Data Details

With this example’s EDS configuration, the ASCII modules take the
maximum transmit and receive sizes from the EDS file and add an
overhead of 4 bytes to each length. The data lengths in this example
are 20 bytes, so the transmit and receive sizes for the scanner would
be 24 bytes. The following table illustrates the format of the transmit
and receive data with the header bytes.

Sending Data Through the ASCII Modules

To send data from the master scanner through the ASCII modules, the
desired data should be written into the data area, starting at byte 5
after the header. Next, the number of bytes to be transmitted should
be put into byte 4 of the header. Lastly, the transaction ID byte 2
needs to be changed from it’s previous value to trigger the
transmission (i.e., incrementing the ID value by 1 each time a message
is to be sent).

Receiving Data From the ASCII Modules

To receive data from the master scanner through the ASCII modules,
look for the transaction ID in byte 1 to change in value. When this
happens, a new data buffer is available for storage. Read the length of
the data from byte 4 and copy that amount of bytes from the data
buffer starting at byte 5 into a file.

Table B.3 Receive Data Format - Short_String Data Type

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5-X

(Max 128 Bytes)

Byte X+1

(Max = 132)

Transaction ID Byte

Status Byte

Reserved

Length

ASCII Data

(following the length

byte)

<CR>

(Terminator)

Table B.4 Transmit Data Format - Short_String Data Type

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5-X

(Max 128 Bytes)

Byte X+1

(Max = 132)

RX ID Byte

(Handshaking Mode

only)

Transaction ID Byte

Reserved

Length

ASCII Data

(following the length

byte)

<CR>

(Terminator)

Advertising
This manual is related to the following products: