|
|
| Author |
Message |
Guest
|
Posted: Thu May 17, 2007 11:49 am Post subject: Own software versus PicoLog sampling for TC08-USB |
|
|
Hello.
I've created some software in C++ to store temperature readings from a TC08 USB unit in an array temp_array - see code fragment below. My problem is that when measuring the same temperature variation using the same settings (1500 samples @ 200ms interval), my software produces a graph of temperature data which is "compressed" compared to that produced by PicoLog. This compression is of about 10%. I thought that the problem might be that around 1 in 10 samples were being overwritten in the array, but I cannot see a problem with my code which would cause that. Another explanation is that each of the sampling interval is slightly longer than 200ms, but the values stored in the time_array state that the interval is indeed 200ms. I would be very grateful if someone could suggest what the problem is here.
Code fragment:
-------
tc08_handle = usb_tc08_open_unit();
usb_tc08_set_mains(tc08_handle, 0);
usb_tc08_set_channel(tc08_handle, 1, 'K');
usb_tc08_run(tc08_handle, 200);
overflow = 0;
total_number_of_readings = 0;
temp_array_index = 0;
while (total_number_of_readings < 1500)
{
number_of_readings = usb_tc08_get_temp(tc08_handle, temp_buffer, time_buffer, buffer_length, overflow, 1, 0, 0);
total_number_of_readings = total_number_of_readings + number_of_readings;
Thread::Sleep(1000);
for (i = 0; i < number_of_readings; i++)
{
temp_array[temp_array_index+i] = temp_buffer[i];
time_array[temp_array_index+i] = time_buffer[i];
}
temp_array_index = temp_array_index + number_of_readings;
}
usb_tc08_stop(tc08_handle);
usb_tc08_close_unit(tc08_handle);
------- |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Jun 13, 2007 11:14 am Post subject: |
|
|
Hello.
I'm still struggling with this problem. Does anyone have any ideas at all? Even guesses would be welcome... |
|
| Back to top |
|
 |
ziko Site Admin

Joined: 01 Dec 2006
Posts: 596
Location: St Neots
|
Posted: Mon Jun 25, 2007 12:31 pm Post subject: |
|
|
Hi a couple of our software engineers have had a look at this, could you send me a file with your results indicating where the problem is and what you are expecting.
Kind regards |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|