Mutiple USB tc-08 in Excel

Post your VB and VBA discussions here
Post Reply
Kurt

Mutiple USB tc-08 in Excel

Post by Kurt »

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".)

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Mutiple USB tc-08 in Excel

Post by Robin »

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

Kurt

Re: Mutiple USB tc-08 in Excel

Post by Kurt »

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

Post by Kurt »

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

Thanks for the help.

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Mutiple USB tc-08 in Excel

Post by Robin »

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

Post Reply