Appendix A. Useful Features; Appendix A.1. How To Use Data Arrays To Map To/From Card-Point-Sub Addresses - FieldServer FS-8700-41 Driver Manual

Simplex time recorder company - 4100 computer port protocol
Table of Contents

Advertisement

FS-8700-41 Simplex 4100 Driver Manual

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
Sim4100_sub
1 s per p
implies s=0 every time
2 s per p
implies s=0,1 for each p
5 s per p
implies s=0,1,2,3,4 for each p
x s per p
implies s=0,1,...(x-1)
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
, Xpoint
, 10
If data is received for point <c>-<p>-<s> = 9-0-0, this data will NOT be processed because the card number does not match
the value of the sim4100-card
If data is received for point <c>-<p>-<s> = 10-20-0, however, the data will be processed.
The array location is derived using the following formula (sim4100_sub is to be read as the "number of sub-points per point";
sim4100_card's value will be ignored.)
Location
= data_array_offset + <p> * sim4100_sub + <s>
= 0 + 20 * 10 + 0 = 200
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: support@fieldserver.com
Calculated Offset
0
1
2
3
c-0-0
c-1-0
c-2-0
c-3-0
c-0-0
c-0-1
c-1-0
c-1-1
c-0-0
c-0-1
c-0-2
c-0-3
c-0-0
c-0-1
c-0-2
c-0-3
, sim4100_point
, sim4100_sub
,20
, 10
4
5
6
c-4-0
c-5-0
c-6-0 ...
c-2-0
c-2-1
c-3-0 ...
c-0-4
c-0-5
c-1-0 ...
c-0-4
c-0-5
c-0-6 ...
The length parameter reserves space in Data Array Items in
the Map Descriptor. If the calculated length exceeds the
length an error is printed and no data is stored (for Xpoint).
, data_array_offset
, 0
Page 16 of 48
...
, Length
, 100

Advertisement

Table of Contents
loading

Table of Contents