Appendix a. useful features, Appendix a.1. separating data streams, O appendix a.1.1 – FieldServer FS-8700-115 User Manual

Page 12: Appendix a.1.1

Advertising
background image

FS-8700-115 ASCII Driver (General Purpose)

Page 12 of 13

FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com

Tel: (408) 262 2299 Fax: (408) 262 2269 Toll Free: (888) 509 1970 email: [email protected]

Appendix A. USEFUL FEATURES

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), or when the default
IC_Timeout period (5s) elapses.

The default end of stream character can be changed using the registry or connection parameter.

Appendix A.1.1. Custom izing Data Stream Separation using Connection Param eters .

If the connection parameter Termination_Char is specified, the user can define the character used to indicate the
end of the data stream. If the connection parameter EndPart_String is specified, a string can be used to specify the
end of the data stream. The Termination_Char and EndPart_String parameters can be used in conjunction. The
IC_Timeout period can also be configured by the user.

Example

// Client Side Connections

Connections

Port , Protocol , Baud , Parity , EndPart_String , Termination_Char , IC_Timeout
P1

, ASCII

, 9600 , None

, The End

, 13

, 2s

Appendix A.1.2. Changing the default end of stream character using the registr y.

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.

[FieldServer_P1]
Termination_Char = 13
default_Termination_Char = 13

Appendix A.2. Interaction with the WebServer Driver

This driver is specially configured to watch for registry changes that are initiated from the WebServer driverCreate
web pages to change the registry settings.

Browse to the web page.
Change a setting.
When the WebServer sees that the 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 using a browser. The FieldServer configuration file will not have to be changed. Ensure
that registry.ini is installed on the FieldServer.

<FST_COMBO Reg_name= "FieldServer_P1:Baud"
List_Items="300;600;1200;2400;4800;9600;19200;38400;115200;">
<FST_TEXT Reg_name = "FieldServer_P1:Data_Bits" >
<FST_TEXT Reg_name = "FieldServer_P1:Stop_Bits" >
<FST_TEXT Reg_name = "FieldServer_P1:Parity" >

Similar fields may be added for any parameter in the registry file but note that not all registry settings are used by
this driver.

Advertising