FieldServer FS-8700-82 Computer Drive User Manual


 
FS
-
8700
-
82 Carrier DataLink
Page
23
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
Appendix A.3. Map Descriptor Length Explained
The Length parameter is specified as part of the Map Descriptor.
Appendix A.3.1. Client Reads a Table:
The length determines the number of table variables whose values are to be stored
when the response is received. If you do not know the length of the table in advance,
set the length to a large number (e.g. 100). If the table contains more elements than the
number defined in the length parameter, the additional data will be discarded.
Appendix A.3.2. Client reads a variable:
Response to a variable read takes many forms. The ‘value’ returned can be a number, a
state (like ON), a time or some other string. To store a number or the time set the length
to 1. When a state or string is returned, the driver looks it up in a table of state words. If
it makes a match then it returns the value that has been associated with the state word,
(e.g. ON = 1, OFF = 0). If it cannot make a match, it stores the string byte for byte in the
data array. The number of bytes stored is determined by the length parameter. Thus, if
the length is 1 and the string is ‘INTERRUPTED’ then the driver will store the ‘I’ in the
data array. If the length was two, then the driver would use two consecutive locations
and store ‘I’ and ‘N’.
Appendix A.3.3. Client writes a variable:
Always set the length to 1
Appendix A.3.4. Server:
The length parameter is used when the server returns a value that is a string. The
length is used to tell the driver how many characters to extract from consecutive array
location to form the response string. When the server returns a value that is a number,
state or time the length should always be 1.
Appendix A.4. How the Client stores the states/values of the Table Variables.
Appendix A.4.1. Discrete States
When a Carrier DataLink device reports the state of a table variable which has a discrete
state, it reports the state as a keyword like on/off. This driver has to convert the
keywords to numbers as most other remote devices are interested in the state as a
numeric value of 1 or 0.
The driver is programmed to recognize certain keywords. A list is provided below. The
driver is also capable of allowing the user to add to the table of predefined keywords by
specifying additional information in the configuration file.
State Word Value State Word Value
CLEAN 1 ALERT 2
DIRTY 0 EMSTOP 0
HEAT 1 ENABLE 1
COOL 0 Service 0
ON 1 OFF-local 1