FS-8705-06 GPA (General Purpose ASCII) Manual Page 3 of 15
1. GPA (General Purpose ASCII) Driver Description
The serial GPA (General Purpose ASCII) Driver allows the FieldServer to accept data from
remote devices which produce an ASCII byte stream. A typical example of such a device is an
electronic scale producing an output similar to the one below.
:weight 0.57 Kg Tare 44.3 Kg 1 2 3 4 -5 -6.7
The driver waits passively for messages. When a message is received the driver converts each
space delimited string of characters/numbers into a number. The numbers so formed are stored
in consecutive elements of a Data Array. Referring to the example above, the driver will store
the value .57 in the 1
value 1 in the next, the value 2 in the next etc.
The driver can process negative numbers.
This driver has significant limitations
Only one data stream per connection - if two different streams of string data are sent to the
same port, the data from the one will overwrite data from the other.
The driver can only process numbers that are presented in a simple numeric form.
Hexadecimal, Exponent-mantissa and other complex forms cannot be processed.
Max Nodes Supported
FieldServer Mode Nodes Comments
Client 1 Only 1 node per port.
Server The driver cannot serve data
st
element of the Data Array (DA), the value 44.3 in the next element, the
:
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com
FS-8705-06 GPA (General Purpose ASCII) Manual Page 5 of 15
3. Hardware Connections
The FieldServer is connected to the vendor device as shown in connection drawing.
Configure the ASCII Passive Client according to manufacturer’s instructions
Ethernet Network
Connection via std networking
interfaces such as hubs, switches,
routers.
Use 8917-02 or a 3 wire cable
where you connect the remote
device Xmit to RJ45-01, the remote
ASCII Data
Source
Eg. Scale
Receive to RJ45-08 and, the gound
wire to RJ45-04.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com
FS-8705-06 GPA (General Purpose ASCII) Manual Page 6 of 15
4. Configuring the FieldServer as an GPA Driver Client
For a detailed discussion on FieldServer configuration, please refer to the FieldServer
Configuration Manual. The information that follows describes how to expand upon the factory
defaults provided in the configuration files included with the FieldServer (See “.csv” sample files
provided with the FieldServer).
This section documents and describes the parameters necessary for configuring the FieldServer
to communicate with a GPA (General Purpose ASCII) Driver Server.
4.1. Data Arrays/Descriptors
The configuration file tells the FieldServer about its interfaces, and the routing of data
required. In order to enable the FieldServer for GPA (General Purpose ASCII) Driver
communications, the driver independent FieldServer buffers need to be declared in the
“Data Arrays” section, the destination device addresses need to be declared in the “Client
Side Nodes” section, and the data required from the servers needs to be mapped in the
“Client Side Map Descriptors” section. Details on how to do this can be found below.
Note that in the tables, * indicates an optional parameter, with the bold legal value being the
default.
Section Title
Data_Arrays
Column Title Function Legal Values
Data_Array_Name Provide name for Data Array
Up to 15 alphanumeric
characters
Float, Bit, UInt16, SInt16,
Data_Array_Format
Provide data format. Each Data
Array can only take on one format.
Packed_Bit, Byte,
Packed_Byte,
Swapped_Byte
Number of Data Objects. Must be
Data_Array_Length
larger than the data storage area
required by the Map Descriptors for
FS-8705-06 GPA (General Purpose ASCII) Manual Page 9 of 15
4.4. Client Side Map Descriptors
4.4.1. FieldServer Related Map Descriptor Parameters
Column Title Function Legal Values
Up to 32
Map_Descriptor_Name Name of this Map Descriptor
Data_Array_Name
Name of Data Array where data is to be
stored in the FieldServer
Data_Array_Offset Starting location in Data Array
Function of Client Map Descriptor.
Refer to the FieldServer configuration
Function
information for more information. Note
that passive client means that the map
descriptor owns the Data Array
elements and no other active Map
Descriptor can address the same data.
alphanumeric
characters
One of the Data
Array names from
“Data Array”
section above
0 to maximum
specified in “Data
Array” section
above
Server, passive
4.4.2. Driver Related Map Descriptor Parameters
Column
Title
Node_Name Name of Node to fetch data from
Data type
Your choice affects how data is stored.
Data_Type
If you use a Digital type then data is
stored only as 1’s or Zero’s. If you use
non Float types the values are truncated.
Thus 0.6 is stored as zero.
Length of Map Descriptor
Specifies the maximum number of string
items that can be converted to numbers
Length
and stored.
Other than ‘using up’ point count, there is
no danger in setting the length to a larger
number than required.
Address
This commonly used parameter is not
used by this driver.
Function Legal Values
One of the node names
specified in “Client Node
Descriptor” above
In this example, we provide a map descriptor to capture data from a scale and store it in a Data Array called ‘DA_Scale’. The 1
st
element converted from the ASCII steam will be store at offset zero in the Data Array. The driver will convert and store floating point
numbers because the data_type is a floating point type. A maximum of 10 number fields can be processed and stored. The driver
only converts and stores the data when the ASCII stream ends. Read appendix xxxxxx to learn how the driver knows when a stream
has ended and it should process and strore data.
Map Descriptor
Names do not
need to be unique
but making them
so may facilitate
trouble shooting.
The name of the
Data Array where
the incoming data
should be stored.
The 1
s
t
element of
converted data will be
stored at this location
in the DA. Subsequent
data is stored in
consecutive locations.
Driver waits passively
for incoming data.
There is no polling.
Connects this Map
Descriptor to a Node
Descriptor which in
turn points to a
connection descriptor.
When the driver processes the
stream it should (in this case) treat
the data as floating point data.
Ensure that the format of the Data is
suitable to store a floating point
value
A maximum of
10 value items
will be stored.
FS-8705-06 GPA (General Purpose ASCII) Manual Page 11 of 15
5. Configuring the FieldServer as a GPA Driver Server
Driver cannot be used to serve data. Contact the Sales group at FST if you are interested in
this functionality.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com
FS-8705-06 GPA (General Purpose ASCII) Manual Page 12 of 15
Appendix A. Advanced Topics
Appendix A.1. Separating Data Streams.
The driver processes the ASCII stream and stores the converted data when the stream
ends. By default the driver closes the stream when it receives the CR character (Hex code
= 0x0d Decimal code = 13).
The default end of stream character can be changed using the registry.
The example below is an extract from registry.ini. The Registry group is for port P1. Similar
groups can exist for other ports and a group may have more settings than those shown
below. If you wished to change the end of stream character to a NEW LINE character
(Hex=0x0a Decimal=10) then change the 13’s to 10’s in the example below. The default_
value is used by the registry when it receives a ‘restore defaults’ command.
Appendix A.2. Interaction with the WebServer Driver
This driver is specially configured to watch for registry changes that are initiated from the
WebServer driver. It is possible to configure the connection settings of the port without
changing the configuration file as follows:
• Create web pages to change the registry settings.
• Browse to the web page.
• Change a setting.
• When the WebServer sees that the new settings have been updated it sets a signal for
the ASCII driver to use the new settings.
The html fragment below can be inserted in a Web Page. It will allow a user via a browser to
change the connection settings for P1.
You can add a similar field for any parameter in the registry file but note that only some
registry settings are used by this driver and only some drivers (including this one) are
designed to be notified of a change and will work with the changed data.
Using this interface you can deliver a system which a customer can simply use to adjust the
connection settings without learning how to configure a FieldServer. Ensure that registry.ini
is installed on the FieldServer.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com
FS-8705-06 GPA (General Purpose ASCII) Manual Page 13 of 15
Appendix B. Troubleshooting tips
Appendix B.1. Timeouts
If the end of stream character has not been received in the default timeout period of 0.5
seconds the driver clears the incoming buffer and waits for the beginning of the next stream.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com
FS-8705-06 GPA (General Purpose ASCII) Manual Page 14 of 15
Appendix C. Driver Error Messages
Error Description and Corrective Action
ASCII:#1 FYI. Port
\"%s\" Connection
Parameters Can Be
Changed Remotely
ASCII:#2a/b FYI. Port
\"%s\" Setting Changed
Remotely. New Setting:
%s
ASCII:#3a/b FYI. Port
\"%s\" Initial Setting:%s
Start Char 0x%2X
End Char 0x%02X
Termination Time %fs
You can safely ignore this message. It is designed to make you
aware of the capability of the driver. Refer to Appendix A.2
You can safely ignore this message if the setting reported match
your expectations. The driver is reporting that connection settings
have been changed. The change resulted from a change to the
FieldServer registry settings and this driver has been notified to start
working with the new settings.
The driver is reporting initial settings for port. The message is for
your information only and no corrective action is required if it
confirms you expectations. If it doesn’t review and correct the
configuration file or registry.ini file.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com