Test and Measurement Forum

TC-08 - get_formatted_info

Post any questions you may have about our current range of USB data loggers

TC-08 - get_formatted_info

Postby SJKebab » Tue Mar 30, 2010 1:29 am

Hi,
I'm currently writing some software to speak to 1x ADC 20 & 3x TC-08s. I"d like to obtain the serial numbers for each TC-08 so that I can make sure that the correct logger is enabled for the correct purpose each and every time. However, using VEE 7.5, I keep getting this error message.

Function was not loadable: usb_get_formatted_info

Error: 604

Object title: Call tc08.usb_get_formatted_into
Object type: Call

The strange part is that every other function in the SDK has usb_tc08_ at the start of the function name except this one. If I try to call the function by the usb_tco8 name, an unknown function error pops up. The function usb_tc08_get_unit_info seems to be missing from the library too. What's going on here?

I'm using SDK 1.0.0, but after checking this website, it seems to be the latest version available. Anyone got any pointers?
Cheers,
SJKebab
 

Re: TC-08 - get_formatted_info

Postby SJKebab » Tue Mar 30, 2010 1:40 am

Found the problem. There's an error in the usb_tc08.vh file, which incorrectly removes the tc08 part of the name from the header, which is stopping the call from completing successfully. TO fix, open up the usb_tc08.vh file and change this line:

short __stdcall usb_get_formatted_info (short handle,
char* unit_info,
short string_length);

to this:

short __stdcall usb_tc08_get_formatted_info (short handle,
char* unit_info,
short string_length);

Save the file, and now call the correctly named function. Pico engineers, you might want to update the SDK with this fix, and any others that may have been found by others in the past.

Cheers,
SJKebab
 

Re: TC-08 - get_formatted_info

Postby Robin » Tue Mar 30, 2010 8:31 am

Hi

Well spotted! I have updated the SDK.

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

Re: TC-08 - get_formatted_info

Postby SJKebab » Wed Mar 31, 2010 3:23 am

*bows*

One thing I noticed though about the get formatted info function, is that the output string contains some non-printable characters between the serial number and the calibration date. It threw me because when I was trying to test for a certain s/n, the test kept failing even though they matched perfectly. Turned out that 2 exact same strings differed by 2 invisible characters. I've worked around this by only asking vee to get the first 9 characters of the serial number, and this works for the 3 units I have here. I have absolutely no idea if it will hold true for all tc08 units though. Thoughts?
Cheers,

(My god that capcha is tough to read!)
SJKebab
 

Re: TC-08 - get_formatted_info

Postby Robin » Wed Mar 31, 2010 12:09 pm

The serial number should be a null-terminated string. Does VEE recognise the null character as the end of a string?
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: TC-08 - get_formatted_info

Postby SJKebab » Thu Apr 01, 2010 12:47 am

Here's the output from get_formatted_info.

Driver version: 1, 7, 0, 0

Picopp.sys version: 01.13

Hardware version: 1

Unit variant: 3

Batch and serial: HAT34/102

Calibration date: 13Jul07

Well that was interesting. The notepad file it was sent to displayed it like this.

Driver version: 1, 7, 0, 0Picopp.sys version: 01.13Hardware version: 1Unit variant: 3Batch and serial: HAT34/102Calibration date: 13Jul07

So yeah, missing null terminators. There you go. At least I know that it'll be consistant though. Thanks.
SJKebab
 


Return to USB PC Data Loggers

Who is online

Users browsing this forum: No registered users and 0 guests