Echelon LNS User Manual
Page 109
LNS Programmer's Guide
95
4. For each device, start a transaction, and commission the device with the
Commission() or CommissionEx() methods. Before committing the transaction,
you should use the DownloadConfigProperties() method to synchronize the
configuration property values in the physical device with those stored in the LNS
database. Note that the ConfigPropertiesAvailable property of the device’s
Interface must be set to True for you to call DownloadConfigProperties() at
this point.
Alternatively, you could commission the device and then call the
UploadConfigProperties() method after committing the transaction to
synchronize the configuration property values in the database with those stored in
the LNS database. For more details on how you can synchronize configuration
property values, and for information on other considerations you should make when
commissioning devices, see Commissioning Devices on page 121.
MySystem.StartTransaction()
If MyInterface.ConfigPropertiesAvailable Then
MyAppDevice.DownloadConfigProperties_
(lcaConfigPropOptLoadValues OR lcaConfigPropOptSetDefaults)
End If
MyAppDevice.CommissionEx(lcaCommissionFlagNone)
MySystem.EndTransaction()
5. If
the
ConfigPropertiesAvailable property was set to False in Step 4, or if you
bypassed calling the DownloadConfigProperties() method in Step 4 to preserve
the configuration property values stored in the physical device, upload the
configuration property definitions into the LNS database with the
UploadConfigProperties() method. This will set the
ConfigPropertiesAvailable property on all devices using this template to True
(or False, depending on the device’s implementation).
Typically, you will also want to upload the values from the device and set the
defaults from the device by specifying the lcaConfigPropOptLoadValues and
lcaConfigPropOptSetDefaults options when you call the
UploadConfigProperties() method. Alternatively, you could update some or all
of the configuration property values using data points, and then call
UploadConfigurationProperties() with the lcaConfigPropOptLoadValues,
lcaConfigPropOptSetDefaults and lcaConfigPropOptLoadUnknown options
set to upload all values not specifically set, and then set the defaults to the values
defined for this device. For optimal performances, you should set all configuration
property values in a single transaction. For more information on these tasks, see
Application-specific Configuration Data on page 125.
6. Bring the device online by setting the State property of the AppDevice object to
lcaStateCnfgOnline.
MyAppDevice.State = lcaStateCnfgOnline
7. You can now add the device to connections on your network, as your network design
requires. For instructions on creating and managing connections, see Connecting
NOTE: Depending on the system management mode, the changes you make to each
device may or may not be propagated to the physical device on the network as you invoke