Check if TC-08 is still connected ?

Post your .Net discussions here
Post Reply
AbnViso
Newbie
Posts: 0
Joined: Fri Jun 28, 2019 1:34 pm

Check if TC-08 is still connected ?

Post by AbnViso » Wed Jul 03, 2019 2:38 pm

Hi Forum,

PicoLog, has the ability to check which device is still connected. BUT HOW ? :D

Let's say I have two TC-08 connected and have runned TC08OpenUnit() for both and have the handle for both.

If I then pull the USB on one of them, how do I check which one is still connected ?

Running TC08OpenUnit will return 0, because the unit that is still connected is already open.

Any suggestions ?

NeilH
PICO STAFF
PICO STAFF
Posts: 145
Joined: Tue Jul 18, 2017 8:28 am

Re: Check if TC-08 is still connected ?

Post by NeilH » Mon Jul 08, 2019 7:00 am

Hi

You could call usb_tc08_get_unit_info which will return a 0 if there is an error (such as the device being disconnected) once you've pulled the USB out of the device if you try to call it on that device or you could call this function once you've connected to the TC-08 and get the serial number of each device by calling it once with each handle then you will know which handle is no longer available after disconnecting the USB without needing to call an extra function after the event.

Neil
Neil
Technical Support Engineer

AbnViso
Newbie
Posts: 0
Joined: Fri Jun 28, 2019 1:34 pm

Re: Check if TC-08 is still connected ?

Post by AbnViso » Fri Jul 26, 2019 7:40 am

@NeilH
You could call usb_tc08_get_unit_info which will return a 0 if there is an error (such as the device being disconnected)
I'm sorry but this simply doesn't work ?

If you know for sure that this should work, could you please send me a working code example ?

NeilH
PICO STAFF
PICO STAFF
Posts: 145
Joined: Tue Jul 18, 2017 8:28 am

Re: Check if TC-08 is still connected ?

Post by NeilH » Mon Jul 29, 2019 6:54 am

Are you able to send in your code into support@picotech.com so I can have a look at how you've implemented this?

Neil
Neil
Technical Support Engineer

AbnViso
Newbie
Posts: 0
Joined: Fri Jun 28, 2019 1:34 pm

Re: Check if TC-08 is still connected ?

Post by AbnViso » Mon Jul 29, 2019 7:08 am

Hi NielH,

I just send the C# file to the support mail.

I would very much like to see the code you have running where is works ?
And I would be awesome if you uploaded it to your C# TC-08 GitHub :P

Post Reply