datalogd.plugins.picotc08_datasource module

class datalogd.plugins.picotc08_datasource.PicoTC08DataSource(sinks=[], interval=1.0, mains_rejection='50Hz', probes=[[1, 'Channel_1', 'K', 'C'], [2, 'Channel_2', 'K', 'C'], [3, 'Channel_3', 'K', 'C'], [4, 'Channel_4', 'K', 'C'], [5, 'Channel_5', 'K', 'C'], [6, 'Channel_6', 'K', 'C'], [7, 'Channel_7', 'K', 'C'], [8, 'Channel_8', 'K', 'C']])[source]

Bases: datalogd.DataSource

Obtain readings from a Pico Technologies TC-08 USB data logging device.

The drivers and libraries (such as libusbtc08.so on Linux, usbtc08.dll on Windows) from PicoTech must be installed into a system library directory, and the picosdk python wrappers package must be on the system (with pip install picosdk or similar).

The interval parameter determines how often data will be obtained from the sensors, in seconds. The minimum interval time is about 0.2 s for a single probe and 0.9 s for all eight.

The mains_rejection parameter filters out either 50 Hz or 60 Hz interference from mains power. The frequency is selected as either "50Hz" or "60Hz".

The probes parameter is a list of probe to initialise. Each element is itself a list of the form [number, label, type, units], where probe numbers are unique integers from 1 to 8 corresponding to an input channel on the device. Probe labels can be any valid string. Valid probe thermocouple types are "B", "E", "J", "K", "N", "R", "S", "T", or "X", where "X"" indicates a raw voltage reading. Units are one of Celsius, Fahrenheit, Kelvin, Rankine specified as "C", "F", "K" or "R". For the "X" probe type, readings will always be returned in millivolts.

acquire_data()[source]

Acquire data from the TC-08 streaming buffer.

close()[source]

Close the connection to the Pico TC-08 device.