Problems by opening multiple USB TC08 Units by VB6

Post general discussions on using our drivers to write your own software here
Post Reply
Joerg

Problems by opening multiple USB TC08 Units by VB6

Post by Joerg » Tue Feb 07, 2006 11:54 am

Some times the sequence of the units are different.
This makes problem because the unit index (0-3) is also used for my other equipment (oven, power supply) index.
I thought I solve the problem by using the function
"usb_tc08_get_unit_info" or "usb_tc08_get_formatted_info"
and set then explicit the index of the units.

But unfortunally the functions dosn`t work!!!!

For example by run my software first time:
Unit0 Serialno: GJY30/137
Unit1 Serialno: GJY30/142
Unit2 Serialno: GJY30/143
Unit3 Serialno: GJY30/158

For example by run my software for x th time:
Unit0 Serialno: GJY30/142
Unit1 Serialno: GJY30/158
Unit2 Serialno: GJY30/143
Unit3 Serialno: GJY30/137

For opening 4 units i use VB6 structure:
-----------------------------------------------------------------
Sub Init_TempLog()
Dim ok As Integer
i = 0
Do While 1 = 1
tc08_handle(i) = usb_tc08_open_unit()
If tc08_handle(i) <= 0 Then Exit Do
If (tc08_handle(i) > 0) Then
Call usb_tc08_set_mains(tc08_handle(i), 0)
ok = usb_tc08_set_channel(tc08_handle(i), 1, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 2, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 3, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 4, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 5, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 6, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 7, Asc(" "))
ok = usb_tc08_set_channel(tc08_handle(i), 8, Asc("X"))
Else
Hinweis = MsgBox("Unable to open DataLogger" & i, vbOKOnly, Message)
End If
TempLogUnits = i
i = i + 1
Loop
End Sub

Plewe, Joerg
User
User
Posts: 8
Joined: Tue Feb 07, 2006 10:34 am
Location: Germany

Re: Problems by opening multiple USB TC08 Units by VB6

Post by Plewe, Joerg » Thu Feb 16, 2006 6:30 am

"usb_tc08_get_unit_info" or "usb_tc08_get_formatted_info" does not run at VB6
also
"usb_tc08_get_unit_info" declaration is missing in VB6 modul

[quote="Joerg"]Some times the sequence of the units are different.
This makes problem because the unit index (0-3) is also used for my other equipment (oven, power supply) index.
I thought I solve the problem by using the function
"usb_tc08_get_unit_info" or "usb_tc08_get_formatted_info"
and set then explicit the index of the units.

But unfortunally the functions dosn`t work!!!!

For example by run my software first time:
Unit0 Serialno: GJY30/137
Unit1 Serialno: GJY30/142
Unit2 Serialno: GJY30/143
Unit3 Serialno: GJY30/158

For example by run my software for x th time:
Unit0 Serialno: GJY30/142
Unit1 Serialno: GJY30/158
Unit2 Serialno: GJY30/143
Unit3 Serialno: GJY30/137

For opening 4 units i use VB6 structure:
-----------------------------------------------------------------
Sub Init_TempLog()
Dim ok As Integer
i = 0
Do While 1 = 1
tc08_handle(i) = usb_tc08_open_unit()
If tc08_handle(i) <= 0 Then Exit Do
If (tc08_handle(i) > 0) Then
Call usb_tc08_set_mains(tc08_handle(i), 0)
ok = usb_tc08_set_channel(tc08_handle(i), 1, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 2, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 3, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 4, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 5, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 6, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle(i), 7, Asc(" "))
ok = usb_tc08_set_channel(tc08_handle(i), 8, Asc("X"))
Else
Hinweis = MsgBox("Unable to open DataLogger" & i, vbOKOnly, Message)
End If
TempLogUnits = i
i = i + 1
Loop
End Sub[/quote]

Michael
Advanced User
Advanced User
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire

Post by Michael » Wed Feb 22, 2006 10:23 am

Hello Joerg,

We have updated the TC08 examples and I have attached them here for you to download.

Best regards,
Michael
Attachments
Examples.zip
(52.97 KiB) Downloaded 475 times
Michael - Tech Support
Pico Technology
Web Support Forum

Post Reply