15 modbus driver, 1 modbus channels, 1 using the list function on modbus channels – Echelon i.LON SmartServer 2.0 User Manual
Page 250: 2 using the get function on modbus channels, Modbus driver -1, Modbus channels -1, Using the list function on modbus channels -1, Using the get function on modbus channels -1, Modbus channels

i.LON SmartServer 2.0 Programmer’s Reference
15-1
15
Modbus Driver
The following chapter describes how to manage Modbus channels, devices, and data points on the
SmartServer.
15.1
Modbus Channels
The following section describes how to use the List, Get, Set, and Delete functions on Modbus
channels.
15.1.1
Using the List Function on Modbus Channels
You can use the List function to retrieve a list of Modbus channels on the SmartServer. The List
function takes an <iLonItem> element that has an xSelect statement with a MOD_Channel_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_Channel_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</UCPTname>
<UCPTannotation>RS485;xsi:type="MOD_Channel_Cfg"</UCPTannotation>
<UCPThidden>0</UCPThidden>
</Item>
</iLonItem>
</List>
The List function returns a list of <Item> elements for each Modbus channel defined on the
SmartServer. 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 Modbus channel included in
the list. The next section describes the properties included in each of these elements.
15.1.2
Using the Get Function on Modbus Channels
You can use the Get function to retrieve the configuration of a Modbus channel defined on the
SmartServer. The input parameters you supply to this function will include one or more <Item>
elements with a MOD_Channel_Cfg type. Each <Item> element will include the <UCPTname> of
each channel 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_Channel_Cfg">
<UCPTname>Net/Modbus
Channel</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_Channel_Cfg">
<UCPTname>Net/Modbus
Channel</UCPTname>