| Page 11 of 31 |
4.4.5.Map Descriptor Example 2 – Read a Variable
This example illustrates how to read single variables from a Carrier Device. A Map Descriptor needs to be defined for each variable. Reading variables is effective for reading a limited set of variables from a table(s). Scaling can be applied when the driver stores the value by using the additional parameters: Data_Array_Low_Scale, Data_Array_High_Scale, Device_Low_Scale, Device_High_Scale
Map_Descriptor_Name, | Data_Array_Name, | Data_Array_Offset, | Function, | Node_Name, | Length, | Scan_Interval, | Table_Name, | Field_Name | |||||||
Read_Temps_Md1 | , | DA_TEMPS | , | 0 | , | rdbc | , | FAN01 | , | 1 | , | 5.0s | , | DISPLAY , | RAT |
Read_Temps_Md2 | , | DA_TEMPS | , | 1 | , | rdbc | , | FAN01 | , | 1 | , | 5.0s | , | DISPLAY , | SAT |
As we are using the same data array for both variables, we change the offset.
The ‘RAT’ temperature will be stored at index 0 (first element), the SAT temperature will be stored at index 1 (2nd element of array).
The pneumonic variable name. |
| |
Space Temperature | RAT | |
Supply Air Temperature | SAT |
The variable names are supplied by the Carrier Corporation. Refer to Appendix A.2 for assistance in determining version names.
4.4.6.Map Descriptor Example 3 – Write A Variable
This example illustrates how to force a variable. Always set the length to 1 for a write. If the variable cannot be written then an error will be reported. In this example the variable being written is called ‘FAN’. It can be set on/off because is a discrete point.
Map_Descriptor_Name, | Data_Array_Name, | Data_Array_Offset, | Function, | Node_Name, | Length, | Scan_Interval, | Table_Name, | Field_Name | ||||
Write_Md1 | , | DA_DISPLAY , | 0 | , | wrbc , | FAN01 , | 1 | , | 5.0s | , | DISPLAY , | FAN |
If the first element of this array is set to 1, the fan will be set ON; if set to zero the fan will be set OFF.
This function ensures that the driver writes the Setpoint to the device continuously (every 5 seconds in this example.) Use WRBX to generate a write message each time the value in the array is updated.
Take care to specify variables that can be forced.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com Tel: (408)