| |
- tc08
class tc08 |
|
Class providing an python interface to a Pico Technology Ltd.
TC-08 temperature logger using the tc08lnx Linux driver
from Pico Technology.
Requires tc08lnx to be installed in /usr/local/bin. Also requires the
non-standard python module shm (System V shared memory). |
|
Methods defined here:
- __del__(self)
- Ensure the tc08lnx driver gets killed.
- __init__(self, channels, channel_names, portname, units='K', interval=None, name='tc08')
- Arguments:
name: A string with which to label this instance. Used
for logging purposes
channels: Type of thermocouple connected to each channel,
encoded as a string of eight characters, one per
channel. Available types are B, E, J, K, R,
S, T and X (microvolts). For unused channels enter
'-'.
channel_names: String containing a comma seperated list of
labels for the channels.
portname: String containing the device name of the serial port
that the TC-08 is connected to, e.g. '/dev/ttyS0'
units: Specifies the units, 'C' for celsius, 'K' for Kelvin.
interval: Interval, in seconds, at which entries are added to the log
- getChannels(self)
- Returns the channel config string.
- getColdJunction(self)
- Returns the current cold junction temperature.
- getLastTemps(self, n=1)
- Returns the last n lines of data in the log file, for plotting
purposes, for example. If n=0 then all lines are returned.
If n is not given just the last line is returned.
- getName(self, number)
- Returns the channel label for a given channel number
- getNames(self)
- Returns the list of channel labels
- getNumber(self, name)
- Returns the channel number corresponding to a given label
- getTemps(self)
- Returns the current temperatures as an list.
- isActive(self)
- isInitialised(self)
| |