beautypg.com

3 using the set function on a lonworks device, 1 issuing network management commands, Using the set function on a l – Echelon i.LON SmartServer 2.0 User Manual

Page 226: Orks, Device -26, Device

background image

i.LON SmartServer 2.0 Programmer’s Reference

14-26

14.3.3

Using the Set Function on a L

ON

W

ORKS

Device

You can use the Set function to overwrite the configuration of a device, or to create a new device. The
input parameters you supply to the function will include one or more elements. Each
element includes a property that specifies a unique device to be created or modified.

Each element may also include a series of properties that define the configuration of the new
(or modified) device. This set of properties is the same whether you are creating a new device or
modifying an existing device.

• If you are creating a new device, you only need to specify the property; all

other properties are optional. You can commission the device and set the device application
online by providing the and properties and
setting them to COMMISSIONED and APP_RUNNING respectively. Otherwise, the device will
be decommissioned and/or set offline upon creation.

• If you are modifying an existing device, you must specify the property. In

addition, all other properties should be filled; otherwise the values stored in them are erased. The
previous section, Using the Get Function on a L

ON

W

ORKS

Device, details the properties you can

include in the Set function.

You can set multiple devices with a single Set message. However, you should not attempt to create or
write to more than 100 devices with a single call to the Set function. The following example
demonstrates how to create a new L

ON

W

ORKS

device. Note that in this example, the device interface

(XIF) file is also activated. This automatically creates the device’s functional blocks and data points
without having to explicitly add them using a Set command. See Issuing Network Management
Commands
for more information on using the GetTemplate network management command.

Request (create a new L

ON

W

ORKS

device on the SmartServer and activate the device interface)



0

xsi:type="LON_Device_Cfg">

Net/LON/DIO-2
00a145784600
80000105288a0403

LonFormat="UCPTapplicationStatus">APP_RUNNING

LonFormat="UCPTcommissionStatus">COMMISSIONED

/root/lonWorks/Import/Echelon/LonPoint/Version3/dio-10v3.xife>


GetTemplate

LonFormat="UCPTstatus">STATUS_REQUEST




Response



0

Net/LON/DIO-2


14.3.3.1 Issuing Network Management Commands

You can use the Set function to issue network management commands on L

ON

W

ORKS

devices. You

can use network management commands to commission/decommission devices, set device
applications online/offline, upgrade devices by downloading application images files (.apb extension)
to them, activate device templates, reset devices, wink devices, and fetch the program IDs of devices.