Test and Measurement Forum

Mutiple USB tc-08 in Excel

Post your VB and VBA discussions here

Mutiple USB tc-08 in Excel

Postby Kurt » Thu Oct 22, 2009 9:27 am

How can I monitor more than one "USB tc-08" in excel?
I have written the VBA program, but only one "USB tc-08" can be monitored.
Can I monitor four "USB tc-08" in excel simultaneously?

(I tried to open 4 Excels(with different file names) to do this at once, they could find 4 different serial numbers, but only the current Excel can monitor one "USB tc-08".)
Kurt
 

Re: Mutiple USB tc-08 in Excel

Postby Robin » Thu Oct 22, 2009 12:21 pm

Hi Kurt

You can open multiple devices by calling the open function more than once and using a different handle for each.

Hope this helps

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Mutiple USB tc-08 in Excel

Postby Kurt » Thu Oct 22, 2009 12:37 pm

Hi Robin,
Thanks for your kind reply.

But I don't understand what you mean.
Can you tell me what I should do in detail?
Kurt
 

Re: Mutiple USB tc-08 in Excel

Postby Kurt » Thu Oct 22, 2009 12:50 pm

By the way
What I want is opening 4 excel programs to monitor 4 devices.

Thanks for the help.
Kurt
 

Re: Mutiple USB tc-08 in Excel

Postby Robin » Thu Oct 22, 2009 1:44 pm

Hi Kurt

In your VBA, presumably, you are using usb_tc08_open_unit to open a single unit. This function returns a handle to that unit. If you want to open 4 units, call usb_tc08_open_unit four times, storing each of the handles. i.e.

handle1 = usb_tc08_open_unit()
handle2 = usb_tc08_open_unit()
handle3 = usb_tc08_open_unit()
handle4 = usb_tc08_open_unit()

If you need to find which handle corresponds to which unit, you can use usb_tc08_get_unit_info to get the serial number for a particular handle.

You can then use usb_tc08_get_unit_info or usb_tc08_get_single to read the temperatures.

For full descriptions of the API functions, see:

http://www.picotech.com/document/pdf/usbtc08_en.pdf

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am


Return to VB and VBA (Excel, Access)

Who is online

Users browsing this forum: No registered users and 0 guests