Formattedvalue, D formattedvalue – Echelon OpenLNS User Manual
Page 278
OpenLNS Programmer's Reference
241
FormattedValue
Summary
Contains the value of the data point as a Variant.
To read the value of a data point’s source object (the value of
the source object in the OpenLNS database and on the
network device containing the source object) as a formatted
value, call the DataPoint object's Read method, and then
read this property. If the AutoRead is set to True, the Read
method will be called automatically each time this property
is read.
To write the value stored in this property to a data point’s
source object (the value of the source object in the OpenLNS
database and on the network device containing the source
object), set this property to the desired value, and then call
the DataPoint object's Write method. If the AutoWrite
property is set to True, the Write method will automatically
be called each time this property is written to.
This property shares memory space with the Value
RawValue properties, which means that the information
contained in all three properties represents the same value.
The only difference between the three properties is that each
them is formatted differently; therefore, when you write to
the FormattedValue property, OpenLNS will update the
values of the Value and RawValue properties automatically,
to match the updated FormattedValue property.
If the data point’s source object is a network variable, you
should note that reading the Value property always causes a
poll and returns the resulting response, even if the network
variable is bound to the host or if the Data Server is already
polling. If the Value property is read, and the poll fails, an
exception will be thrown.
If the data point’s source object is a configuration property,
you can use the ValueStatus property to determine if the
value stored in the OpenLNS database for the configuration
property matches the value stored on the physical device. In
addition, the setting of the DataPoint object’s SourceOptions
property affects how LNS accesses the value of the
configuration property (either from the physical device
containing the configuration property, or from the OpenLNS
database).You should also be aware that some configuration
properties contain a constant attribute. If a configuration
property has the constant attribute set, it marks the
configuration property as read-only. If this attribute is set
and you attempt to write to the FormattedValue property, an
exception will be thrown. However, in some cases, you can
use the ConstantAttribute property to set or turn off this
attribute using OpenLNS.
You can use the MinValue and MaxValue properties to set
the minimum and maximum possible values for the data
point. If you write a value to the FormattedValue property
that exceeds the range established by these properties, the