Temperature measurements with PT-104 (USB)

Post general discussions on using our drivers to write your own software here
Post Reply
Posts: 0
Joined: Fri Jun 26, 2020 9:24 am

Temperature measurements with PT-104 (USB)

Post by ikaranin »


I use a PT-104(USB) Datalogger to do temperature measurements. Data is acquired from 3 channels. Everything works fine, but I would like to speed up my temperature measurements.
Software is written on C# and uses usbpt104.dll driver. The sofware implementation is based on https://github.com/picotech/picosdk-c-sharp-examples/tree/master/usbpt104 example.

As soon the channels are selected the hardware starts to do measurements. According to specification measurement takes about 720 ms per active channel
I use a UsbPt104GetValue function to read out actual temperature values. I have constantly do pooling in order to get valid results from the function (with PICO_STATUS=OK). It might take some time and slow downs the whole measurement process.

Do you have an option to synchronize software and hardware in order to minimize the waiting(pooling) time
for several channels ?

Posts: 693
Joined: Mon Aug 11, 2014 11:14 am

Re: Temperature measurements with PT-104 (USB)

Post by Gerry »

Hi ikaranin,

There is no way to synchronise the software and hardware (you would have to have the computer generating timing for the data logger, which would have to be over some expensive custom hardware connection, because USB has far too much latency), just as there is no other hardware link, generating an interrupt when data is ready, which would add cost and complexity.

So, an alternative method that springs to mind is the use a timer/counter (e.g. from your C# library or a better source) to give you an indication when 700ms, or 500ms has elapsed (whichever is the best precision that you can achieve from your counter/timer) to make sure the timed period is definitely shorter than the conversion period. Then, when the counter/timer times-out, just retrieve the data without having to check it. Note that this should guarantee that no data is missed, but will mean that you will get some duplicated data. Still, polling the result of a code efficient local counter is a step better than polling a value over the USB bus.


Technical Specialist

Post Reply