FS-8700-123 MetOne Particle Counter Driver Manual
Page 14 of 22
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
5.10
Map Descriptor Example 7 – Read the Current Record
In this example the driver reads the current record and stores the values in the specified Data Array. A single record comprises status; date, time and a count
for 1 or more locations. The driver has no advance knowledge of the number of count fields to expect in the response. It simply stores up to a maximum of 20
count fields in consecutive locations in the Data Arrays. To map these counts to a Client protocol the order of the count fields must be known. The Map
Descriptor length must be set to a value that allows for enough data to be stored bearing in mind that it requires 8 Data Array elements to store the status date
and time and period. One of these Map Descriptors is required for each device from which the current record is to be read.
// Client Side Map Descriptors
Map_Descriptors
Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , Function , Node_Name , Met1_Function , Length , Scan_Interval
Read Record
, DA_DATA
, 0
, Rdbc
, MET1
, Current Record , 20
, 1.0s
Offset 0
1
2
3
4
5
6
7
8
9
10
...
Data
Status Byte Date - Month Date - Day Date - Year Time - Hours Time - Minutes Time - Seconds Period Count #1 Count #2 Count #3 ...
5.11
Map Descriptor Example 8 – Dumping the Current Record
In this example a secondary Data Array has been specified. Each time a response is received the driver dumps the response byte for byte the secondary Array
in addition to the storage specified in the previous example. It is important to avoid overlaps in the secondary arrays if this feature is used on multiple Map
Descriptors. We suggest that about 2-300 DA elements is made available for the dump and that the format of the secondary Data Array is ‘BYTE’
Map_Descriptors
Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , DA_Byte_Name , Function , Node_Name , Met1_Function , Length , Scan_Interval
Read Record
, DA_DATA
, 0
, DA_DUMP
, Rdbc
, MET1
, Current Record
, 20
, 1.0s
The length must be set to a value large enough to store the 8
fixed data items and the variable number of count fields.
Driver stores the current record information in the Data Array
specified here starting at the specified offset. The data is arranged as
depicted in the following table.
A secondary Data Array is specified with the ‘DA_Byte_Name’ parameter.
When this is done the driver stores the read current record response byte for
byte in the secondary DA.
The length specified the amount of Data
Array space reserved for primary
storage and has no effect on the dump.
Ensure that dumps don’t overlap.