| Page 10 of 26 |
4.5.Map Descriptor Example 1 – Read Hold ( or Sample) Times from a Device.
In this example the driver reads the hold time from the field device. The time is stored in 3 consecutive Data Array elements. To read Sample Times simply change the Met1_Function to ‘Sample Time. The driver extracts the time from the response and stores the hours at the specified offset, the minutes in the next Data Array location and the seconds in the 3rd location.
//Client Side Map Descriptors
Map_Descriptors |
|
|
|
|
|
|
|
Map_Descriptor_Name, | Data_Array_Name, | Data_Array_Offset, | Function, | Node_Name | Met1_Function, | Length, | Scan_Interval |
Read_Time, | DA_TIMES, | 0, | RDBC, | MET1, | Hold Time , | 3, | 5.0s |
|
|
|
|
|
|
|
|
While | not | When |
|
| a |
mandatory, | response |
| is | ||
giving | each | received |
| the | |
Map | Descriptor | driver | extracts | ||
a unique name | the data | and | |||
will | help to | stores | it | in | the |
diagnose | Data |
| Array | ||
configuration | named |
| here | ||
problems. | starting |
| at | the | |
|
| location |
|
| |
|
| specified | by | the | |
|
| offset |
|
|
|
|
| parameter. |
|
|
| Tells | the driver | |
Tells | the driver | to read the Hold | ||
Time | from the | |||
to | Read | |||
field device. | ||||
continuously. | ||||
|
|
The name of the Node. The driver uses this name to link the Map Descriptor to a Node Descriptor (where it finds the Device Number specified with the Node_ID parameter). The Node Descriptor provides a link to the connection.
Reserves 3
Data array locations for storing data.
This task must be executed
every 5 seconds.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldServer.com Tel: 408