Manual entry, Loading device application images – Echelon LNS User Manual

Page 133

Advertising
background image

LNS Programmer's Guide

119

foreground task. For more information, see the help page for the DiscoverDevices()

method in the LNS Object Server Reference help file.

NOTE: You should not use find and wink on systems that use shared media. Instead,

you should use the confirmed service pin protocol described earlier in this chapter, or you

should manually enter the Neuron ID, as described in the next section.

Manual Entry

In many cases, the Neuron ID is manually supplied to the LNS application. Most

L

ON

W

ORKS

devices are shipped with the Neuron ID printed on the housing or packaging.

The Neuron ID for each device is also frequently supplied on stickers that can be peeled
off during physical installation and attached to a device list or floor plan, allowing for the

installer to scan these Neuron IDs at a later stage. Alternatively, the installer could be
required to manually enter the Neuron ID for each device. Manually entering the data

could be as easy as running a bar code reader over the coded location on the plan

(representing the device’s physical location), followed by running the reader over the bar
code containing the Neuron ID of the device at that location. It is also possible to type in

the Neuron ID as a series of 6 hexadecimal digits.

If a router is being installed while not connected to the network (e.g. when using the

engineered mode installation described in Chapter 5), the Neuron IDs of the near and far
sides of the router must be entered. You can do so by writing to the NeuronId property of
the RouterSide object accessed through the NearSide and FarSide properties of the
Router object. When installing a router while attached to the network, only the Neuron

ID for the near side is required, and LNS will fetch the far side’s Neuron ID from the

device automatically. Note that the service pin message received from a router always

provides the near side Neuron ID.

Loading Device Application Images

Neuron Chip-based devices are usually programmed with an application when they are

manufactured. Although loading application images is normally not required for

production-level devices, this is a common operation during device development,
manufacture, and test. For production-level devices, application images may need to be

reloaded into previously-installed devices to repair a damaged application, or to upgrade
a device's capabilities.

To load a device’s application image, the device’s application must be accessible to the

LNS Server PC in application binary format (.APB file). Note that you cannot load a

device’s application image while in engineered mode, and the system management mode
must be set lcaMgmtModePropagateConfigUpdates when you load an application

image.

To load an application image into a device, follow these steps:

1. Set the path to the application image file on the LNS Server PC by writing to the

AppDevice object’s AppImagePath property.

MyAppDevice.AppImagePath = "c:\DeviceApps\Smkdtctr.apb"

Application image files can reside in any location that can be reached through the file
system on the LNS Server PC. Thus, setting the AppImagePath property to
C:\LonWorks\Import\Acme\Cooker.apb will refer to the cooker.apb file in the

Advertising