Problems by opening multiple USB TC08 Units by VB6

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
Joerg
Guest





PostPosted: Tue Feb 07, 2006 11:54 am    Post subject: Problems by opening multiple USB TC08 Units by VB6 Reply with quote

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
Back to top
Plewe, Joerg
Active User
Active User


Joined: 07 Feb 2006
Posts: 8
Location: Germany

PostPosted: Thu Feb 16, 2006 6:30 am    Post subject: Re: Problems by opening multiple USB TC08 Units by VB6 Reply with quote

"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]
Back to top
Michael
Guru
Guru


Joined: 07 Jul 2005
Posts: 93
Location: St Neots, Cambridgeshire

PostPosted: Wed Feb 22, 2006 10:23 am    Post subject: Reply with quote

Hello Joerg,

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

Best regards,
Michael



Examples.zip
 Description:

Download
 Filename:  Examples.zip
 Filesize:  52.97 KB
 Downloaded:  263 Time(s)

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group