2 modbus devices, 1 using the list function on modbus devices, 2 using the get function on modbus devices – Echelon i.LON SmartServer 2.0 User Manual
Page 256: Modbus devices -7, Using the list function on modbus devices -7, Using the get function on modbus devices -7, Modbus devices

i.LON SmartServer 2.0 Programmer’s Reference
15-7
15.2
Modbus Devices
The following section describes how to use the List, Get, Set, and Delete functions on Modbus devices.
15.2.1
Using the List Function on Modbus Devices
You can use the List function to retrieve a list of Modbus devices on the SmartServer. The List
function takes an <iLonItem> element that has an xSelect statement with a MOD_Device_Cfg type as
its input, as shown in the example below.
Request
<List xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<xSelect>//Item[@xsi:type="MOD_Device_Cfg"]</xSelect>
</iLonItem>
</List>
Response
<List xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<UCPTfaultCount>0</UCPTfaultCount>
<UCPTcurrentConfig>4.0</UCPTcurrentConfig>
<Item>
<UCPTname>Net/Modbus
Channel/LAE_LCD15_1</UCPTname>
<UCPTannotation>App;xsi:type="MOD_Device_Cfg"</UCPTannotation>
<UCPThidden>0</UCPThidden>
</Item>
</iLonItem>
</List>
You could use the list of <Item> elements returned by this function as input for the Get function. The
Get function would then return the configuration of each device included in the list. The next section
describes the properties included in each of these elements.
15.2.2
Using the Get Function on Modbus Devices
You can use the Get function to retrieve the configuration of a Modbus device defined on the
SmartServer. The input parameters you supply to this function will include one or more <Item>
elements with a MOD_Device_Cfg type. Each <Item> element will include the <UCPTname> of each
device whose configuration is to be returned by this function, as shown in the example below.
Request
<Get 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_1</UCPTname>
</Item>
</iLonItem>
</Get>
Response
<Get xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<UCPTfaultCount>0</UCPTfaultCount>
<Item
xsi:type="MOD_Device_Cfg">
<UCPTname>Net/Modbus
Channel/LAE_LCD15_1</UCPTname>
<UCPTannotation>App</UCPTannotation>
<UCPThidden>0</UCPThidden>
<UCPTlastUpdate>2008-04-02T12:15:22.960-07:00</UCPTlastUpdate>
<UCPTuri>MOD_Device_Cfg.htm</UCPTuri>
<UCPThandle>0</UCPThandle>
<UCPTmaxElements>1</UCPTmaxElements>
<Address>
<UCPTaddress>0</UCPTaddress>
</Address>