Echelon i.LON SmartServer 2.0 User Manual
Page 395
i.LON SmartServer 2.0 Programmer’s Reference
21-43
my_LON_Device1.UCPTprogramId = HexStringToArray(
"80000105288a0403"
)
my_LON_Device1.UCPTurlTemplate =
"/root/lonWorks/Import/Echelon/LonPoint/Version3/dio-10v3.XIF"
my_LON_Device1.UCPTcommissionStatus =
New
iLON_SmartServer.E_LonString()
my_LON_Device1.UCPTcommissionStatus.Value =
"COMMISSIONED"
my_LON_Device1.UCPTapplicationStatus =
New
iLON_SmartServer.E_LonString()
my_LON_Device1.UCPTapplicationStatus.Value =
"APP_RUNNING"
'create a command array to store device commands to be sent
my_LON_Device1.Command =
New
iLON_SmartServer.LON_Device_CfgCommand(2) {}
'commission device
my_LON_Device1.Command(0) =
New
iLON_SmartServer.LON_Device_CfgCommand()
my_LON_Device1.Command(0).UCPTcommand =
New
iLON_SmartServer.LON_Device_eCommand()
my_LON_Device1.Command(0).UCPTcommand =
iLON_SmartServer.LON_Device_eCommand.ChangeCommissionStatus
my_LON_Device1.Command(0).UCPTstatus =
New
iLON_SmartServer.E_LonString()
my_LON_Device1.Command(0).UCPTstatus.LonFormat =
"UCPTstatus"
my_LON_Device1.Command(0).UCPTstatus.Value =
"STATUS_REQUEST"
'run device application
my_LON_Device1.Command(1) =
New
iLON_SmartServer.LON_Device_CfgCommand()
my_LON_Device1.Command(1).UCPTcommand =
New
iLON_SmartServer.LON_Device_eCommand()
my_LON_Device1.Command(1).UCPTcommand =
iLON_SmartServer.LON_Device_eCommand.ChangeApplicationStatus
my_LON_Device1.Command(1).UCPTstatus =
New
iLON_SmartServer.E_LonString()
my_LON_Device1.Command(1).UCPTstatus.LonFormat =
"UCPTstatus"
my_LON_Device1.Command(1).UCPTstatus.Value =
"STATUS_REQUEST"
'get the device template to show FBs and DPs in Web UI
my_LON_Device1.Command(2) =
New
iLON_SmartServer.LON_Device_CfgCommand()
my_LON_Device1.Command(2).UCPTcommand =
New
iLON_SmartServer.LON_Device_eCommand()
my_LON_Device1.Command(2).UCPTcommand = iLON_SmartServer.LON_Device_eCommand.GetTemplate
my_LON_Device1.Command(2).UCPTstatus =
New
iLON_SmartServer.E_LonString()
my_LON_Device1.Command(2).UCPTstatus.LonFormat =
"UCPTstatus"
my_LON_Device1.Command(2).UCPTstatus.Value =
"STATUS_REQUEST"
'=====CREATING AND INSTALLING LON DEVICE #2==================
' specify properties of new LON Device #2
my_LON_Device2.UCPTname =
"Net/LON/DIO-2"
my_LON_Device2.UCPTlocal = 0
my_LON_Device2.UCPTuniqueId = HexStringToArray(
"00a145784600"
)
my_LON_Device2.UCPTprogramId = HexStringToArray(
"80000105288a0403"
)
my_LON_Device2.UCPTurlTemplate =
"/root/lonWorks/Import/Echelon/LonPoint/Version3/dio-10v3.XIF"
my_LON_Device2.UCPTcommissionStatus =
New
iLON_SmartServer.E_LonString()
my_LON_Device2.UCPTcommissionStatus.Value =
"COMMISSIONED"
my_LON_Device2.UCPTapplicationStatus =
New
iLON_SmartServer.E_LonString()
my_LON_Device2.UCPTapplicationStatus.Value =
"APP_RUNNING"
'create a command array to store device commands to be sent
my_LON_Device2.Command =
New
iLON_SmartServer.LON_Device_CfgCommand(2) {}
'commission device
my_LON_Device2.Command(0) =
New
iLON_SmartServer.LON_Device_CfgCommand()
my_LON_Device2.Command(0).UCPTcommand =
New
iLON_SmartServer.LON_Device_eCommand()
my_LON_Device2.Command(0).UCPTcommand =
iLON_SmartServer.LON_Device_eCommand.ChangeCommissionStatus
my_LON_Device2.Command(0).UCPTstatus =
New
iLON_SmartServer.E_LonString()
my_LON_Device2.Command(0).UCPTstatus.LonFormat =
"UCPTstatus"
my_LON_Device2.Command(0).UCPTstatus.Value =
"STATUS_REQUEST"
'run device application
my_LON_Device2.Command(1) =
New
iLON_SmartServer.LON_Device_CfgCommand()
my_LON_Device2.Command(1).UCPTcommand =
New
iLON_SmartServer.LON_Device_eCommand()
my_LON_Device2.Command(1).UCPTcommand =
iLON_SmartServer.LON_Device_eCommand.ChangeApplicationStatus
my_LON_Device2.Command(1).UCPTstatus =
New
iLON_SmartServer.E_LonString()
my_LON_Device2.Command(1).UCPTstatus.LonFormat =
"UCPTstatus"
my_LON_Device2.Command(1).UCPTstatus.Value =
"STATUS_REQUEST"