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,
TC-08 - get_formatted_info
Re: TC-08 - get_formatted_info
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,
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,
Re: TC-08 - get_formatted_info
Hi
Well spotted! I have updated the SDK.
Robin
Well spotted! I have updated the SDK.
Robin
Re: TC-08 - get_formatted_info
*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!)
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!)
Re: TC-08 - get_formatted_info
The serial number should be a null-terminated string. Does VEE recognise the null character as the end of a string?
Re: TC-08 - get_formatted_info
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.
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.