PicoScope 7 Software
Available on Windows, Mac and Linux
Code: Select all
/**************************************************************************
* C program for reading temperatures from TC-08 (USB) device in Kelvins
* author: Dusan P Djurdjevic, Edinburgh UNI, 2005.
***************************************************************************/
#include
#include "usbtc08.h"
#define TC_TYPE_K 'K'
int main()
{
short hTC08;
int i;
float buf1[10], buf2[10];
short overflow;
// open unit
hTC08 = usb_tc08_open_unit ();
// check if everything OK
if (hTC08 <= 0)
{
printf("Error Code: %d\n",usb_tc08_get_last_error (0));
return(99);
}
// set channels
for (i=0; i<=8; i++) usb_tc08_set_channel (hTC08, i, TC_TYPE_K);
// read temperature in Celsius Kelvin
usb_tc08_get_single(hTC08, buf1, &overflow,USBTC08_UNITS_CENTIGRADE);
usb_tc08_get_single(hTC08, buf2, &overflow,USBTC08_UNITS_KELVIN);
// write output
printf("%10s %10s %10s\n","Channel No","C","K");
for (i=0; i<=8; i++) printf("%-10d %10.3f %10.3f\n", i, buf1[i], buf2[i]);
}
Code: Select all
D:\Projects\Experiments_SEE\Driver\Drivers\Win32>kelvin_problem.exe
Channel No C K
0 25.757 298.757
1 25.467 298.595
2 25.544 298.555
3 25.695 298.672
4 25.743 298.643
5 25.503 298.444
6 25.698 298.621
7 25.312 298.235
8 25.772 25.728
Many Thanks Sarah.Sarah wrote: We have investigated this and found that there was an error in the driver. We have corrected this and if you email tech@picotech.com requesting a copy then we will send it to you.