Installing devices – Echelon LNS User Manual

Page 107

Advertising
background image

LNS Programmer's Guide

93

For a device to provide location information to the application, there must be some way

for the device to know its location. For example, each device’s location field can be
programmed with a location code, and each device can be sent to the field with

instructions for where the device is to be attached to the network. Alternately, a hand-

held tool could be used to set the location string of each device at installation time. If the
LNS application contains a table that maps codes to physical locations, the application
can fetch the location code using the AppDevice object’s LocationInNeuron property,

and determine where the device is located.

Another way for a device to determine its location is to provide a way for it to read its

location using I/O pins. You could achieve this by embedding location information at each

attachment site. The network connector could contain a 6-bit connector ID that allows

the device to tell which of 64 connectors it has been attached to. Alternately, a serial ID
device such as a Dallas touch memory could be used to provide a unique ID for each

location while using fewer I/O pins on each application device. The use of I/O pins may

require that device’s program is running, so that it can read the I/O pins. If such
behavior is required, the device must be delivered in the configured state or the device’s
application must use the Neuron C pragma run_unconfigured compiler directive.

There is another method to determine a device’s approximate location. This method is

less precise, as it provides a device’s approximate location, but it is fully automatic. When
using automatic installation, LNS will automatically detect the channel each application

device is attached to, as long as the network only uses configured routers. The channel is

an indicator for the device’s approximate location and may assist with automatic location
detection. Further, if pinging is enabled on the system, the LNS pinging process will

verify the device’s presence on the channel it was previously attached to. See the

Discovering When New Devices are Attached to the Network section later in this chapter
for more details on this.

If a device can determine its own location, it may also be able determine when it has

been moved. This information can be used as part of the installation scenario. For

example, if a temperature sensor is moved from room 1 to room 5, the sensor can tell that
it has moved and, under application control, activate its service pin to issue a "request for

service". When the LNS application receives the service pin event, it can check the

database and see that the device was already installed in the system as part of another
room, and then reconnect the network to make the sensor part of the control scheme for

room 5.

Installing Devices

Once your application has discovered a newly discovered device, you need to define the

device in the LNS database, and connect it to other devices on the network. Depending
on how the device was discovered, the steps required to do so may vary slightly. These

tasks are described below.

Note that if your network uses multiple channels, you will need to install and configure

the network’s routers, and create channels, as you define your devices. For more

information on routers, and on special considerations you may need to make when
installing devices on a network with multiple channels, see Installing Devices With

Multiple Channels on page 175.

1. In several of the device discovery methods described in this section, an

AppDevice

object is added to the

Discovered.Uninstalled

subsystem’s

AppDevices

collection each time a new device is discovered. You need to move each device to

Advertising