Hello
this is my VB code... i am not a programmer
but it works...
any enhancements or suggestions are welcome...
"
Dim obj As HBControl
Private Sub Form_Initialize()
Set obj = CreateObject("HBControlMod.HBControl")
' set port , ip and password for HB external control
szRsp = obj.Connect("port", "ip", "psw")
' set up DDE link
TEMP01.LinkTopic = "OneSix|TEMP01"
TEMP01.LinkItem = "Input"
TEMP01.LinkMode = vbLinkAutomatic
WINDDIRECTION.LinkTopic = "OneSix|WINDVANE1"
WINDDIRECTION.LinkItem = "direction"
WINDDIRECTION.LinkMode = vbLinkAutomatic
WINDSPEED.LinkTopic = "OneSix|WINDVANE1"
WINDSPEED.LinkItem = "speed"
WINDSPEED.LinkMode = vbLinkAutomatic
' set values on first run
obj.SetPropertyValue "TEMP01", "Value", Format(TEMP01.Text, "0.0")
obj.SetPropertyValue "WINDSPEED", "Value", Format(WINDSPEED.Text, "00.0")
obj.SetPropertyValue "WINDDIRECTION", "Value", Format(WINDDIRECTION.Text, "000")
End Sub
' update when DDE item changes
Private Sub TEMP01_Change()
obj.SetPropertyValue "TEMP01", "Value", Format(TEMP01.Text, "0.0")
End Sub
Private Sub WINDDIRECTION_Change()
obj.SetPropertyValue "WINDDIRECTION", "Value", Format(WINDDIRECTION.Text, "000")
End Sub
Private Sub WINDSPEED_Change()
obj.SetPropertyValue "WINDSPEED", "Value", Format(WINDSPEED.Text, "00.0")
End Sub
Private Sub Form_Terminate()
Set obj = Nothing
End Sub
"
i have some problems with english vs european number formats... ( . or , )
need to build in some error handling and reset links function..
the example describes moving values from DDE to housebot. you need to set up text items on a form for each item that you want to mirror. set up devices in housbot: TEMP01.Value etc
the onesix server was on their web site as a demo version for 2 devices recently..
i am running this with 30 1-wire devices and it works.
i am really looking fwd if any want to get 1-wire in to housebot. probably not so cumbersam with the TMEX drivers. if uoy are a programmer
ride on, walle