I'm having problems getting the szSerial number and temp readings to work correctly.
Here is the test sub I wrote to try to get things up and running.
Dim intRetStatus As Integer
Dim hTC08 As Integer
Dim tc08Info As USBTC08_INFO
ReDim temp_buffer(9) As Single
Dim intFlag As Integer
Dim intErrorCode As Integer
hTC08 = usb_tc08_open_unit()
If (hTC08) Then
List1.AddItem ("Device #" & hTC08 & " has been opened")
tc08Info.size = 30
intRetStatus = usb_tc08_get_unit_info(hTC08, tc08Info)
List1.AddItem ("Serial Number #" & tc08Info.szSerial)
Call usb_tc08_set_mains(hTC08, True)
intRetStatus = usb_tc08_set_channel(hTC08, 0, Asc("K"))
intRetStatus = usb_tc08_get_single(hTC08, temp_buffer(0), intFlag, 0)
List1.AddItem ("Channel 0:" & temp_buffer(0))
hTC08 = usb_tc08_close_unit(hTC08)
The output of List1 is:
Device # 1 has been opened
Notice that the serial number is blank. I noticed that in your sample VB application the serial number also does not appear.
The serial number is quite important to me as I will be running 8 devices.
At the "get_single" line I get an overflow error, however your sample application works just fine and I can't see the difference between the sample and my test function.
Any assistance here would be much appreciated.
Thanks in advance!