beautypg.com

ProSoft Technology PLX31-EIP-SIE User Manual

Page 154

background image

ASCII Protocol

PLX3x Series

User Manual

Ethernet and Serial Gateways

Page 154 of 218

ProSoft Technology, Inc.

September 17, 2014

Receive Data

Data received by the receive driver is placed in the g

ateway’s internal database

in a fixed format at the location selected by the user. The receiver driver is
disabled if the database start location is set to a value of -1. The following table
shows the structure of the received data.

Word Offset

Description

0

Receive sequence number. This register is incremented by the gateway’s Receive
Driver for each new packet received.

1

Number of characters transmitted (0 to 255) from last transmit request

2

Number of characters (0 to 256) in receive block (9 to 136)

3

Receive State
-1 = Listening for data
1 = Receiving port data

4

Total receive character count

5

Total receive message count

6

Transmit State
0 = Waiting for data to send
1 = RTS on
2 = RTS timeout
3 = Sending data
4 = Waiting for RTS off
5 = RTS turned off
30 = Intercharacter delay
31 = Intercharacter delay
32 = Intercharacter delay
100 = Message delay before transmit
101 = Message delay before transmit

7

Total transmit character count

8

Configuration error word

9 to 136

Received data on port

An incremented received sequence number in Word 0 signals that new data is
available in Words 1, 2, and 9 through 136. (Words 3 through 8 are updated
continuously by the gateway, whether or not the port is receiving messages.)

If the gateway is configured to swap the data bytes received, the receive driver
will swap the bytes in each word received before placing the data into the data
block. Because the data received may contain an odd number of bytes, the
length of the message received will be incremented by 1 when an odd number of
bytes are received and the swap option is utilized. This is to avoid losing the last
byte of data in the message.