| Page 25 of 31 |
Appendix A.4.3. Time Values
If the driver receives a variable value reported in the format hh:mm then the driver stores a number obtained by multiplying the hours by 60 and adding the minutes. The driver recognizes a time value by checking the 3rd character for a colon and checking that the 1st character is a digit.
Value_Stored = hh * 60 + mm
Eg. 5:30pm is reported as 17:20 and is stored as 17*60 + 20 = 1040.
Appendix A.4.4. Numeric Values
The driver recognizes numeric values by checking the first character of the value field. If it is a digit then the field is treated as a number.
Appendix A.4.5. Occupancy Strings / Values
If the value returned for a variable is 8 characters long and each of the characters is a one or a zero then the driver regards this as an occupancy string and converts it to a binary coded decimal value and stores this value.
Eg: 00101010 = 42 decimal
Appendix A.5. Timing Considerations
Reading a whole table can take several seconds depending on the table length. In addition the response from the Carrier device can have small pauses after each line of response. Thus, if you use the default timeout and IC_Timeout settings the communications may fail when either one of the pauses exceeds the IC_Timeout setting or when the whole response hasn’t been received by the time the timeout setting has elapsed.
For this reason it is recommended that the timeout be set to a value between 15 and 30 seconds and the IC_Timeout be set to a value between 7 and 15 seconds. Before setting either of these to the maximum consider that the in the event of a real communications failure, this set amount of time must elapse before the driver recognizes the timeout and reports the node offline. Thus, it is best to start with a smaller value and increase it until reliable communications have been achieved with the timeout settings.
The timeout can be set for the Map Descriptor, the node or the connection. This is more fully explained in the FieldServer Configuration Manual. In summary, if you wish to apply a single timeout to all messages to a device then set the timeout for the connection. If you wish to override the connection timeout settings for a particular node the set the timeout for that node too and if you wish to override the settings for a particular Map Descriptor then set the timeout for that Map Descriptor.
The example below illustrates how to set the timeout parameters at the connection level.
// Client Side Connections |
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
Connections |
|
|
|
|
|
|
|
|
|
|
| |
Port, | Baud, | Parity, | Data_bits, | Stop_Bits, | Protocol , | Handshaking, | Poll_Delay, | Timeou,t, | IC_Timeout | |||
P8, | 9600, | None, | 8 | , | 1 | , | CarrierDL, | None | , | 0.100s , | 30.0s , | 15.0s |
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com Tel: (408)