TC08OpenUnit()

Having problems ? let us know the details here
Post Reply
kevincorcoran
Newbie
Posts: 1
Joined: Fri Feb 10, 2023 10:57 am

TC08OpenUnit()

Post by kevincorcoran »

Hello,

I have just tried to write a basic program to interface to the USB TC08 data logger in a C# .Net WinForms application (64 bit, Visual Studio 2022 on Windows 10). I have installed the latest 64 bit SDK and also the Pico Logger (downloaded yesterday from the site). The Pico logger software works fine. I have downloaded the USBTC08Imports.cs file from the Github repository linked to on the Pico website and also checked the example code available there too.

When I call TC08OpenUnit() with the logger attached as the first interaction, the program hangs for a second and then crashes out. Event in Debugger mode, the program crashes out completely and the debugger cannot catch any error.

If I make the same call with the Pico logger software running, then the code works correctly (and I get a handle of 0 as the logger is already in use). If I make the call without the logger physically connected (and no Pico logger software running), the the code completes successfully indicating no unit found as you would expect. But if I connect the logger and then make the same call, the program crashes without returning from the TC08OpenUnit() routine

The USBTC08Imports.cs file does not include a call to TC08OpenUnitAsync() in it's definitions, but I have added the appropriate definition and link to the DLL file to try and I get the same result. If the logger is not connected, then calling the TC08OpenUnitAsync() routine also crashes the program after a second with no indication of error or with teh debufgger able to capture anything.

I have made the call to TC08OpenUnit() get called when a button is clicked so I can establish that the program is fully stable and nothing else is running. I also see the green LED on the logger come on.

Has anyone else used the unit with an app in C# successfully?

Thanks
Kevin Corcoran

Martyn
Site Admin
Site Admin
Posts: 4501
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: TC08OpenUnit()

Post by Martyn »

We have identified an issue with the USBTC08.dll and are working on a fix. Please download and install the previous version of the SDK from

64 Bit https://www.picotech.com/download/softw ... 22.241.exe

or

32 bit https://www.picotech.com/download/softw ... 22.241.exe
Martyn
Technical Support Manager

Post Reply