Test and Measurement Forum

Own software versus PicoLog sampling for TC08-USB

Post general discussions on using our drivers to write your own software here

Own software versus PicoLog sampling for TC08-USB

Postby Guest » Thu May 17, 2007 11:49 am


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;


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;


Postby Guest » Wed Jun 13, 2007 11:14 am


I'm still struggling with this problem. Does anyone have any ideas at all? Even guesses would be welcome...

Postby ziko » Mon Jun 25, 2007 12:31 pm

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

Technical Specialist
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests