Functionality, Data flow, 2 functionality – ProSoft Technology 5201-DFNT-ASCII User Manual

Page 9

Advertising
background image

Functionality ASCII

♦ ProLinx Standalone

Generic ASCII Serial Communication Module

ProSoft Technology, Inc.

Page 9 of 40

July 7, 2008

2 Functionality

In This Chapter

™

Data

Flow ................................................................................................ 9

This section describes the functionality of the ASCII driver.

2.1 Data

Flow

The following illustration shows receive and transmit dataflow of the ASCII driver.

Data received from the ASCII device is accepted by the receive driver and placed
in the receive database location configured by the user. The receive driver waits
until the user-configured termination condition is recognized while receiving the
data before placing the new data into the database.

For example, if the carriage-return character (ASCII 13) is used as the
termination condition for a received message, this signals the end of the
message. When the receive driver observes this character in the input stream, it
takes all received characters and places them in the internal database.

In both receive and transmit operations, a signal is required to determine when
new data is received or must be transmitted. The first word in the two data area
is used for this purpose. When the value of the first word changes, new data is
available. Lets look at a receive example. The sequence number in the receive
data block has a value of 0 as set when the module initializes. The ASCII device
sends a new data packet and the termination condition is present. The receive
driver copies the data into the internal data area, sets the message length in the
data area, and finally, sets the new sequence number. Receive and transmit data
block structure is discussed in the following topics.

Advertising