Echelon LNS User Manual

Page 93

Advertising
background image

LNS Programmer's Guide

79

Chapter 4 describes how to specify a network interface for each client

type. If your application has already done so, you can switch the
application to engineered mode by setting the NetworkInterface

property of the system's NetworkServiceDevice object to NOTHING.

Dim MyNetworkServiceDevice as LcaNetworkServiceDevice

Set MyNetworkServiceDevice = System.NetworkServiceDevice

Set MyNetworkServiceDevice.NetworkInterface = NOTHING

3. Begin defining the devices and connections on your system. To do so,

fetch the Subsystems collection from the System object, and use the

collection’s Item property to obtain the Subsystem you plan to add the
devices to. Alternatively, you can use the Add() method to create a new
Subsystem.

The returned Subsystem object contains an AppDevices collection you

can add the new devices to. You can add new devices using the
collection’s Add() method.

When using the engineered mode scenario, you must specify a
DeviceTemplate and Channel object when you call the Add() method.

If you do not specify a DeviceTemplate, you will not be able to pre-

define the device’s connections, and or pre-load its configuration
properties. You must specify the Channel object so the LNS Object

Server can properly assign network addresses and compute transaction

timers for the device when it is added to connections. For more
information on creating AppDevice objects, see Creating AppDevice

Objects on page 113.

NOTE: If your network uses multiple channels, you will also need to

define the network’s routers and channels during the definition stage. 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 page 169.

4. If you know the Neuron ID that the device will use, enter it into the

database by writing the Neuron ID to the AppDevice object’s NeuronId

property.

MyAppDevice.NeuronId = DeviceNeuronId

It is common to obtain the devices’ Neuron ID from a sticker on the device

that contains the ID in barcode and/or readable form. In a typical

scenario, the on-site installation staff mounts and wires the physical
devices. While doing so, each device’s Neuron ID sticker is taken from the

device, and attached to a floor plan or similar document. That document

is then used during the definition phase to provide Neuron IDs to the
LNS database.

Note that the Neuron ID may also be acquired via the device’s service pin

and assigned during the commissioning phase, as described in the next

section.

5. Ensure that all configuration properties are properly set, and that they

will be downloaded to the device when it is commissioned. You can do
this by calling the DownloadConfigProperties() method on the

Advertising