beautypg.com

Echelon i.LON SmartServer 2.0 User Manual

Page 26

background image

i.LON SmartServer 2.0 Programmer’s Reference

2-12

The following code samples demonstrate supported xSelect statements.

Example 1 – List or Get all channels on the SmartServer:


= "//Item[@xsi:type="Channel_Cfg"]

Example 2 – List or Get all L

ON

W

ORKS

channels on the SmartServer that were updated after a specific

time:

//Item[@xsi:type="LON_Channel_Cfg"][UCPTlastUpdate

>"2008-04-01T00:00:00

"

]

Example 3 – List or Get all L

ON

W

ORKS

application devices of a specific type (by name) on a specific

channel.


//Item[@xsi:type="LON_Device_Cfg"][contains(UCPTname,"Net/LON/DIO")]

Example 4 – List or Get all instantiated functional blocks on the SmartServer automated systems
device [i.LON App (internal)]:


//Item[@xsi:type="Fb_Cfg"][starts-with(UCPTname,"Net/LON/")][UCPThidden=0]

Example 4 – List, Get, or Read all data points on the Digital Input 1 functional block on the internal
i.LON App device:


//Item[@xsi:type="Dp_Cfg"]

[starts-with(UCPTname, "Net/LON/iLON App/Digital Input 1/")]


Example 5 – Get all SNVT_switch data points on the SmartServer that were updated in the time line
defined by :



//Item[@xsi:type="Dp_Cfg"][UCPTformatDescription="#0000000000000000[0].SNVT_switch"]

[UCPTlastUpdate >"2008-04-01T00:00:00" and UCPTlastUpdate <"2008-04-07T00:00:00"]


Example 6 – List, Get, or Read the data points on the internal i.LON App device in the time line
defined by to return a maximum of the 11th to 29th data points:


//Item[@xsi:type="Dp_Cfg"] [starts-with(UCPTname,"Net/LON/iLON App/")]

[UCPTlastUpdate > "2008-04-01T15:30:21Z" and UCPTlastUpdate < "2008-04-08T15:30:21Z"]

[position()>10

and

position()<30]


Example 7 – List or Get all instantiated Alarm Generators on the internal i.LON App device;


//Item[@xsi:type="UFPTalarmGenerator_Cfg"]

Example 8 – Read the first 10 events scheduled in a Scheduler on the internal i.LON App device:

//Item[@xsi:type=”UFPTscheduler_Data”]

[UCPTname="Net/LON/iLON App/Scheduler"]
[UCPTeventFilter="EF_SCHEDULE"][position()<10]"