3 using the set function on modbus devices, Using the set function on modbus devices -9 – Echelon i.LON SmartServer 2.0 User Manual

Page 258

Advertising
background image

i.LON SmartServer 2.0 Programmer’s Reference

15-9

Property Description

<UCPTuri>

The name of the file on the SmartServer flash disk containing
the configuration of the Modbus device. This property is always
MOD_Device_Cfg.htm.

<UCPThandle>

The handle assigned to the Modbus device assigned by the
SmartServer. When you use the Set function to modify the
configuration of an existing Modbus device, you must specify
the device’s handle. If you do not specify the handle, a new
Modbus device is created. You cannot use the Set function to
modify the handle assigned to the Modbus device.

<UCPTmaxElements>

The maximum number of Modbus data points (registers) that
can be transferred in one Modbus message.

<Address>

The logical address of the device on the Modbus network in
decimal or hexadecimal format.

15.2.3

Using the Set Function on Modbus Devices

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

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

• If you are modifying an existing Modbus device, you must specify the <UCPThandle> 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 Modbus Device, details the properties you can
include in the Set function.

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

Request (create a new Modbus device on the SmartServer)

<Set xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<Item

xsi:type="MOD_Device_Cfg">

<UCPTname>Net/Modbus

Channel/LAE_LCD15_2</UCPTname>

<UCPTmaxElements>1</UCPTmaxElements>
<Address>
<UCPTaddress>0</UCPTaddress>
</Address>
</Item>
</iLonItem
</Set>

Response

<SetResponse xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<UCPTfaultCount>0</UCPTfaultCount>

<Item>

<UCPTname>Net/Modbus

Channel/LAE_LCD15_2</UCPTname>

</Item>

</iLonItem>

Advertising