Echelon LNS User Manual
Page 100
LNS Programmer's Guide
86
Initialize the Object Server, create the network, and open the system. Make
sure that your application is attached to the network when doing so. See
Chapter 4 for more information on these tasks.
Make sure that the system management mode is set to propagate device configuration updates:
System.MgmtMode = lcaMgmtModePropagateConfigUpdates
Create or select the Subsystem object that will
contain the new device:
Subsystems.Add()
Subsystems.Item()
Add an AppDevice object for the new device to to
the AppDevices collection of the selected
Subsystem:
Set MyAppDevices = Subsystem.AppDevices
Set MyDevice = MyAppDevices.Add()
Acquire the Neuron ID for the device as
described in the Neuron ID Assignment section
in Chapter 6 of this document. Then, assign the
Neuron ID to the new AppDevice object.
MyDevice.NeuronId = AcquiredId
Set the device’s Priority and Location
properties to their desired values:
MyDevice.Priority = Prio
MyDevice.Location = Loc
Set the device to the online state.
MyDevice.State = lcaStateCnfgOnline
Connect a device to other
devices on the network:
NvHub.AddTarget()
NvHub.Connect()
For more information on
connections, see Connecting
Devices in Chapter 6.
Remove the device:
AppDevices.Remove()
Choose a task:
Create a device
Add a connection
Remove a device
Optionally. load the device’s application
image:
MyDevice.LoadEx()
Commission the device, and then synchronize the device
configuration properties, and commission the device. You can also
update any configuration property values in this step. Perform these
operations within the same transaction:
MySystem.StartTransaction()
MyDevice.CommissionEx()
MyDevice.DownloadConfigProperties()
MySystem.EndTransaction()
Figure 5.4 Ad Hoc Installation Tasks
The following section describes the tasks depicted in figure 5.4 in more detail. Note that
if your network uses multiple channels, you will need to define the network’s channels
and install and configure the network’s routers as you define your devices. For more
information on this, and on other considerations you will need to make when managing a
network with multiple channels, see Managing Networks with Multiple Channels on
1. Initialize your application, create the network that is to be installed, and open
the system. Make sure that your application is attached to the network at this
point (meaning that is has specified a network interface). These tasks are
described in Chapter 4, Programming an LNS Application.