Downloading and uploading configuration properties – Echelon LNS User Manual
Page 140
LNS Programmer's Guide
126
that template. The configuration property defaults are also defined for the
DeviceTemplate, but the configuration properties of the devices using that template
are not automatically set to the default values.
If a DeviceTemplate was recovered from a device, the configuration properties for that
template will initially be undefined. The ConfigPropertiesAvaliable property will
be set to False in this case. You can load the configuration property definitions for the
associated device template from the physical device using the
UploadConfigProperties()method, as described in the next section.
Downloading and Uploading Configuration Properties
You can use the UploadConfigProperties() method to upload configuration property
values from a physical device on the network into the associated AppDevice object in the
LNS database. You can use the DownloadConfigProperties() method to download
configuration property values stored for the AppDevice object in the LNS database to
the physical device that the object represents.
The configuration property data for a device is not automatically added to the LNS
database when the device is added to the LNS database and commissioned. Therefore,
your LNS application should ensure that the configuration property information stored
in the LNS database for a device is synchronized with the configuration information
stored in the physical device on the network before commissioning the device. You can
use the DownloadConfigProperties() and UploadConfigProperties() methods to
do so. For guidelines on this, see Device Configuration Considerations on page 124.
After you have associated a device with an interface (by commissioning it, or by
specifying a DeviceTemplate and Channel when you create the AppDevice), you can
use the DownloadConfigProperties() and UploadConfigProperties() methods
for a variety of tasks, including the following:
• Setting configuration properties to their default values.
• Setting unknown configuration property values.
To set the configuration properties for a device to their default values, use one of the
following two methods:
• If the device is using a device template based on an external interface file that
defines default values for the device's configuration properties, set all the
configuration properties to the default values in the external interface file by
calling DownloadConfigProperties() with the
lcaConfigPropOptSetDefaults and lcaConfigPropOptLoadValues options
set. Do not specify the lcaConfigPropOptIncludeMfgOnly option, as this will
cause calibration parameters set by the manufacturer to be overwritten. This
operation will ensure that devices that were previously installed on another
network are returned to their default state.
• Set the default configuration property values in the LNS database to match the
current values stored on the physical device on the network by calling
UploadConfigProperties() with the lcaConfigPropOptSetDefaults and
lcaConfigPropOptLoadValues options set. Note that the
UploadConfigProperties() method can only be called after the device has
been commissioned and updated by LNS.