Lns programmer's guide 78 – Echelon LNS User Manual
Page 92
LNS Programmer's Guide
78
Initialize the Object Server and
create or obtain the network you
are defining. Open the network’s
System object. See Chapter 4
for more information on these
tasks.
Connect a device to other
devices on the network:
NvHub.AddTarget()
NvHub.Connect()
For more information on
connections, see Connecting
Devices in Chapter 6.
Set the application into Engineered mode:
Set NetworkServiceDevice.NetworkInterface = NOTHING
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()
If you know the device’s Neuron
ID, assign it to the AppDevice
object:
MyDevice.NeuronId =
Optionally, set other device
properties. For example:
MyDevice.Priority = Prio
MyDevice.Location = Loc
Remove a device
Add a connection
Add a device
Define device templates for the devices you
are going to install:
DeviceTemplates.Add()
DeviceTemplate.Import()
Add devices and connections as your network design requires. When you have finished,
move to the commissioning phase described in the Commissioning Phase section below.
NOTE: If your network uses multiple channels, you will need to install, configure and
commission the network's routers before commissioning the application devices defined
during the definition stage.
Create or select the Subsystem
object that will contain the new
device:
Subsystems.Add()
Subsystems.Item()
Remove the device:
MyAppDevices.Remove()
Ensure that the configuration
property values in the device
are properly set.
Figure 5.2 Engineered Mode Installation Tasks - Definition Phase
The following section describes the steps listed in figure 5.2 in more detail:
1. Initialize your application, create the network that is to be installed, and
open the system. These tasks are described in Chapter 4, Programming
an LNS Application.
2. The definition phase can be performed while your application is in
engineered mode, meaning that it is not attached to the network. In this
case, your application does not need to specify a network interface.