FieldServer FS-8700-82 Computer Drive User Manual


 
FS-8700-82 Carrier DataLink Page 10 of 31
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com
Tel: (408) 262-2299 Fax: (408) 262-9042 Toll_Free: 888-509-1970 email: support@fieldserver.com
4.4.4. Map Descriptor Example 1 – Read a Table
This example illustrates how to read the entire contents of a table called ‘DISPLAY’. The Map Descriptor is connected to a node
using the node name and a node definition provides a connection to a port. Thus this Map Descriptor is connected to a port via its
node. The FieldServer will use that port to send this poll which will be generated every 5 seconds.
The value extracted from the response will be stored in the array called DA_DISPLAY. Ensure that it is suitable format for storing a
number – FLOAT is suggested. The driver stores the value of the 1
st
element at offset 1; the 2
nd
element at offset 2… The number of
table elements whose values have been successfully stored at is stored at offset zero.
// Client Side Map Descriptors
Map Descriptors
Map_Descriptor_Name,
Data_Array_Name,
Data_Array_Offset,
Function, Node_Name,
Length, Scan_Interval,
Table_Name, Field_Name
Read_Table_Md , DA_DISPLAY , 0 , rdbc , FAN01 , 100 , 5.0s , DISPLAY , EVERYTHING
By using the keyword
‘EVERYTHING’ you are
telling the driver to read
the whole table.
Responses are stored in
this data array. Table
element x gets stored at
offset x, where x is a non-
zero integer.
Offset zero is used by the
driver to report how many
values were stored.
The driver
generates a read
poll continuously.
The node name
connects the Map
Descriptor to a
node definition.
The length is set
to a number big
enough to contain
all the table’s
variables.
The name of the
table to be read.