beautypg.com

Dataserverread, Dataserverread -19, Dataserverread on – Echelon i.LON 100 e2 Internet Server User Manual

Page 63: 4 dataserverread, 1 requesting data points by name and index

background image

i.

LON 100 Internet Server Programmer’s Reference

5-19

5.2.1.4 DataServerRead

You can use the DataServerRead function to read the value and status of any data point that
you have added to the Data Server. There are two ways to reference the data points whose

values and statuses are to be returned:

You can reference each data point to be read by its index number or name in the
parameter you supply to the function. If the specified input data point is a structure, you
can specify the field whose value is to be returned below. For more information on this,

and a sample string, see the Requesting Data Points by Name and Index section

later in this chapter.

You can reference a group of data points to be returned by the data point type, and by
the last time the data points were updated. For more information on this, and a sample

string, see the Requesting Data Points by Type and Last Update Time section
later in this chapter.

The DataServerRead function will return a list of elements, one for each data point

referenced by the parameter you supplied to the function. Each of these elements
contains the current values of a group of properties and attributes associated with the

associated data point. This includes the value and the priority level currently assigned to the
data point. This is described in more detail in the in the DataServerRead Output Properties

section later in this chapter.

5.2.1.4.1 Requesting Data Points by Name and Index

You can reference the data points to be returned by their index numbers or names in the
parameter you supply to the function. This may be useful if you only need to request

information for a small number of data points. You should not attempt to read more than 100
data points with a single call to this function.
The following example parameter requests that information for three separate data

points be returned. Note that the name of each element within the parameter must
match the data point type (NVL, NVC) of the data point referenced within it. Table 12, which

follows the example, describes the properties returned by the function for each data point.
The information contained in the parameter for each data point returned by the
function is described in the section later in this chapter.
NOTE: This example includes the optional property. This defines how old
the value of a data point can be, in seconds, before the Data Server retrieves a new data

value from the driver when an application requests its value. If the property is set to 0, the

values of the data points will be copied from the

i.

LON 100 Data Server when an application

requests them, and no update will be requested from the applicable driver. If this parameter

is set to a positive value, the

i.

LON 100 Data Server will poll the driver for the current value

of a data point each time an application requests it, and the time interval defined by the
property has expired. You can temporarily override the value of the

property stored in the

i.

LON 100 Data Server by passing it in to the DataServerRead

message. In doing so, you can determine whether or not the values of the data points you are

reading will be polled for this message. This may be useful if you are creating an application

to monitor a device such as a thermometer, and do not necessarily need a current value. Set
the property to 0, or any value greater than the current poll rate, if you do not want the

values of the data points polled for this message.