Appendix a. useful features, Appendix a.1 – FieldServer FS-8700-41 User Manual
Page 16

FS-8700-41 Simplex 4100 Driver Manual
Page 16 of 48
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. How to use Data Arrays to map to/from Card-Point-Sub addresses
Some commands derive a c-p-s address by inspecting a FieldServer Data Array. Others receive data from a device and modify
the data in an array based on the c-p-s address. This section explains how to make the connection between an index into a
Data Array and a c-p-s address.
To minimise the required Data Array size the FieldServer uses a mapping algorithm which can be optimized based on the
addresses of the Simplex devices. The map is manipulated by using the sim4100_card/point/sub parameter values.
If there are one sub-point (s) per point (p) then only one array location is required for each p.
If there are two sub-point (s) per point (p) then two array locations are required for each p.
If there are x sub-point (s) per point (p) then x array locations are required for each p.
This is more clearly explained in the table below:
# Subpoints/point
Calculated Offset
Sim4100_sub
0
1
2
3
4
5
6
...
1 s per p implies s=0 every time
c-0-0 c-1-0 c-2-0 c-3-0 c-4-0 c-5-0 c-6-0 ...
2 s per p implies s=0,1 for each p
c-0-0 c-0-1 c-1-0 c-1-1 c-2-0 c-2-1 c-3-0 ...
5 s per p implies s=0,1,2,3,4 for each p c-0-0 c-0-1 c-0-2 c-0-3 c-0-4 c-0-5 c-1-0 ...
x s per p implies s=0,1,…(x-1)
c-0-0 c-0-1 c-0-2 c-0-3 c-0-4 c-0-5 c-0-6 ...
Thus the offset into the Data Array is determined according to the following formula.
Data Array Offset = Offset specified on the Map Descriptor (Data_Array_Offset ) + Calculated Offset
Example:
Consider the following Map Descriptor fragment.
... , sim4100_func , sim4100_card , sim4100_point , sim4100_sub , data_array_offset , Length
, Xpoint
, 10
,20
, 10
, 0
, 100
If data is received for point - If data is received for point - The array location is derived using the following formula (sim4100_sub is to be read as the “number of sub-points per point”; Location = data_array_offset + * sim4100_sub + = 0 + 20 * 10 + 0 = 200 The length parameter reserves space in Data Array Items in = 9-0-0, this data will NOT be processed because the card number does not match
the value of the sim4100-card = 10-20-0, however, the data will be processed.
sim4100_card’s value will be ignored.)
the Map Descriptor. If the calculated length exceeds the
length an error is printed and no data is stored (for Xpoint).