Data source options – Echelon LNS User Manual
Page 250
LNS Programmer's Guide
236
ConfigProperty
is not an array, specify 0 as the index parameter.
The second parameter is the options element. This determines how
LNS will apply changes you make to the
DataPoint
object to the LNS
database, and to the physical device on the network. For more
information on this, see the next section, Data Source Options.
Note that you can change both of these options later by modifying the
DataPoint object’s SourceIndex or SourceOptions properties.
3. To set the value of the configuration property through the
DataPoint
object, set the
Value, RawValue
or
FormattedValue
property, and
then call the
Write()
method. Note that you do not need to call
Write()
if the
AutoWrite
property is set to
True
.
MyDataPoint.Value = 1000
MyDataPoint.Write()
NOTE: The Value, RawValue and FormattedValue properties of
DataPoint objects acquired through configuration properties that use
enumerated data types have special behavior that you should be aware
of. For more information, see Data Points and Enumerated Types on page
4. To read the value of the configuration property through the
DataPoint
object, call the
Read()
method and then read the value through the
Value
or
FormattedValue
properties. You do not need to call
Read()
if
the AutoRead property is set to
True
.
Dim Value as String
MyDataPoint.Read()
value = MyDataPoint.FormattedValue
When reading a
DataPoint
object’s value, there are many ways for the
application to affect how the data will be displayed. For more information
on this, see Data Formatting on page 241.
NOTE: Data points are very useful when reading and writing formatted data, or when
accessing an entire raw data value as a whole. However, if you want to access arbitrary
bytes of raw data to read or write a range of elements in a configuration property array,
you should not use a data point. Instead, you should use the GetRawValuesEx() and
SetRawValuesEx() methods of the ConfigProperty object. See the LNS Object Server
Reference help file for more information on these methods.
Data Source Options
When you call the
GetDataPoint()
method, you will use the
options
parameter to
specify how LNS will manage differences that may exist between the value of the
ConfigProperty
in the LNS database and the value of the configuration property in the
physical device on the network when you read or write to the
DataPoint
. Table 9.4
describes the values you can apply to the
options
element.
Note that the value you choose as the options parameter is stored in the
DataPoint
object’s
DataSourceOptions
property. If desired, you can change this setting later.