PLX30 Series
ASCII Protocol
Ethernet and Serial Gateways
User Manual
ProSoft Technology, Inc.
Page 157 of 200
September 19, 2012
Transmit Data
Data to transmit by the transmit driver is placed in the gateway’s internal
database in a fixed format at the location selected by the user. The transmit
driver is disabled if the database start location is set to a value of -1. The
following table shows the structure of transmit data.
Word Offset
Description
0
Transmit sequence number. This number is incremented by the user’s application
for each new packet to transmit.
1
Number of characters received (0 to 256) from last receive request
2
Inter-character delay for this message (milliseconds between characters)
3
Number of characters to transmit on port (0 to 255)
4 to 131
Data to transmit on port
The first word of the data block is used to signal when new transmit data is
available. Word 1 of the block may optionally contain the number of characters
processed in the last receive message. Word 2 of the message is used to pace
the characters during the transmission process. This may be required when
interfacing with slow ASCII devices (that is, modems in command mode).
If the word is set to a value other than zero, a time delay corresponding to the
number of milliseconds entered will be placed between each character
transmitted. If the word is set to zero, the whole data packet will be transmitted
as fast as the transmit driver can function. Word 3 of the data block contains the
number of bytes present in the transmit data area to send out the ASCII serial
communication port. Words 4 to 131 contain the actual data to transmit. If the
swap option is utilized, the transmit driver will swap each byte in the words
received before transmitting them.
Note:
If an odd number of bytes are sent by the end device when the swap option is used, then the
last byte of the message may be lost.