Echelon LNS User Manual
Page 97
LNS Programmer's Guide
83
2. Open the network and the system, and then set the system management mode to
lcaMgmtModePropagateConfigUpdates. Before opening the system, make sure
that your application has specified a network interface.
Set MyNetworks = ObjectServer.Networks
Set MyNetwork = MyNetworks.Item(“Broadcasting Center”)
Set MySystems = MyNetwork.Systems
Set MySystem = MySystems.Item(1)
Set MySystem.NetworkInterface = MyNetworkInterface
MySystem.Open()
MySystem.MgmtMode = lcaMgmtModePropagateConfigUpdates
NOTE: Generally, there are many factors you need to consider when writing to the
MgmtMode property. For more information on this, see System Management Mode
Considerations on page 97.
3. Acquire
the
AppDevices collection for the subsystem containing the AppDevice
objects you have defined. Then, follow steps 4-8 of this procedure for each device in
the collection.
4. If a device was not assigned a Neuron ID during the definition phase, you need to
explicitly set the AppDevice object’s NeuronId property at this point. For
information on how you can use LNS to determine a device’s Neuron ID, see Neuron
ID Assignment on page 115.
5. If a device does not have the correct application image defined, you should load the
device’s application image at this point. For instructions on loading device
application images, see Loading Device Application Images on page 119.
6. 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.
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.
NOTE: If your network uses multiple channels, you will need to commission the
network’s routers as you commission the devices. The Managing Networks with
Multiple Channels section on page 169 provides details on this, including guidelines
on the order you should follow when commissioning routers and application devices
at the same time.
7. Bring each device online by setting the State property of each AppDevice object to
lcaStateCnfgOnline.
You may wish to commission all the devices in the network first, and then set all the
devices online. This prevents superfluous network traffic generated by those devices
that are already online, network delivery errors caused by network variable updates
targeted to devices that are not yet online, and generally helps the commissioning
process proceed more efficiently.