Package jisa.devices.temperature
Class USBTC08
- java.lang.Object
-
- jisa.visa.NativeDevice<USBTC08.NativeInterface>
-
- jisa.devices.temperature.USBTC08
-
- All Implemented Interfaces:
Instrument
,MSTCouple
,MSTMeter
,MultiInstrument
,TCouple
,TMeter
public class USBTC08 extends NativeDevice<USBTC08.NativeInterface> implements MSTCouple
Driver class for Picotech USB-TC08 thermocouple data loggers. Requires proprietary usbtc08 library to be installed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
USBTC08.Frequency
Enumeration of line-frequency rejection modes.protected static interface
USBTC08.NativeInterface
Interface corresponding to native usbtc08 library methods.-
Nested classes/interfaces inherited from interface jisa.devices.interfaces.Instrument
Instrument.AutoQuantity<S>, Instrument.OptionalQuantity<S>, Instrument.Parameter<S>, Instrument.Setter<S>, Instrument.TableQuantity
-
Nested classes/interfaces inherited from interface jisa.devices.interfaces.TCouple
TCouple.Type
-
-
Field Summary
-
Fields inherited from class jisa.visa.NativeDevice
lib, name
-
-
Constructor Summary
Constructors Constructor Description USBTC08()
Connects to the first USB-TC08 unit found connected to the system.USBTC08(java.lang.String serial)
Connects to the first USB-TC08 unit with matching serial number, given as a String.USBTC08(Address address)
Connects to the first USB-TC08 unit with matching serial number, given in the form of an IDAddress object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the connection to the instrument.static java.util.List<USBTC08>
findUnits()
Returns a list of all USB-TC08 units found connected to this computer.Address
getAddress()
Returns any Address object used to connect to this instrument.static java.lang.String
getDescription()
java.lang.String
getIDN()
Returns an identifying String of the instrument.USBTC08.Frequency
getLineFrequency()
Returns the line-frequency rejection mode currently in use.java.lang.String
getName()
Returns the name of the instrument or channel.java.lang.String
getName(int sensorNumber)
int
getNumSensors()
Returns the number of sensors the instrument has.TCouple.Type
getSensorType(int sensor)
Returns the sensor type that the given channel is configured for.java.lang.String
getSerial()
Returns the serial number of this unit.double
getTemperature(int sensor)
Returns the temperature being reported by the specified sensor.double
getTemperatureRange(int sensor)
Returns the measurement range being used for temperature values.java.util.List<java.lang.Double>
getTemperatures()
Returns temperature readings from all sensors as a List indexed by sensor number.void
setLineFrequency(USBTC08.Frequency frequency)
Sets the line-frequency rejection mode to be used.void
setSensorType(int sensor, TCouple.Type type)
Configures the sensor on the TC-08, specifying which type of thermocouple is installed.void
setTemperatureRange(int sensor, double range)
Sets the measurement range for temperature values.-
Methods inherited from class jisa.visa.NativeDevice
search
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jisa.devices.interfaces.Instrument
getConfigurationParameters, getLockObject, setTimeout
-
Methods inherited from interface jisa.devices.interfaces.MSTCouple
getSensor, getSensorType, setSensorType
-
Methods inherited from interface jisa.devices.interfaces.MSTMeter
checkSensor, get, getSensors, getSubInstrument, getSubInstrumentTypes, getTemperature, getTemperatureRange, setTemperatureRange, waitForStableTemperature
-
Methods inherited from interface jisa.devices.interfaces.MultiInstrument
contains, contains, get, getSubInstruments, getSubInstruments
-
Methods inherited from interface jisa.devices.interfaces.TCouple
getConfigurationParameters
-
Methods inherited from interface jisa.devices.interfaces.TMeter
waitForStableTemperature, waitForStableTemperature, waitForStableTemperatureMaxTime, waitForStableTemperatureMaxTime
-
-
-
-
Constructor Detail
-
USBTC08
public USBTC08() throws java.io.IOException, DeviceException
Connects to the first USB-TC08 unit found connected to the system.- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon instrument error
-
USBTC08
public USBTC08(Address address) throws java.io.IOException, DeviceException
Connects to the first USB-TC08 unit with matching serial number, given in the form of an IDAddress object.- Parameters:
address
- Serial number, as IDAddress object- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon instrument error
-
USBTC08
public USBTC08(java.lang.String serial) throws java.io.IOException, DeviceException
Connects to the first USB-TC08 unit with matching serial number, given as a String.- Parameters:
serial
- Serial number, as a String- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon instrument error
-
-
Method Detail
-
getDescription
public static java.lang.String getDescription()
-
findUnits
public static java.util.List<USBTC08> findUnits()
Returns a list of all USB-TC08 units found connected to this computer.- Returns:
- List of USBTC08 objects representing the found units
-
getSerial
public java.lang.String getSerial() throws DeviceException
Returns the serial number of this unit.- Returns:
- Serial number
- Throws:
DeviceException
- Upon instrument error.
-
getTemperature
public double getTemperature(int sensor) throws DeviceException, java.io.IOException
Description copied from interface:MSTMeter
Returns the temperature being reported by the specified sensor.- Specified by:
getTemperature
in interfaceMSTMeter
- Parameters:
sensor
- Sensor to read- Returns:
- Temperature, in Kelvin
- Throws:
DeviceException
- Upon incompatibility with devicejava.io.IOException
- Upon communications error
-
getNumSensors
public int getNumSensors()
Description copied from interface:MSTMeter
Returns the number of sensors the instrument has.- Specified by:
getNumSensors
in interfaceMSTMeter
- Returns:
- Number of sensors
-
getName
public java.lang.String getName(int sensorNumber)
-
getTemperatures
public java.util.List<java.lang.Double> getTemperatures() throws DeviceException
Description copied from interface:MSTMeter
Returns temperature readings from all sensors as a List indexed by sensor number.- Specified by:
getTemperatures
in interfaceMSTMeter
- Returns:
- List of temperatures, in Kelvin
- Throws:
DeviceException
- Upon incompatibility with device
-
setTemperatureRange
public void setTemperatureRange(int sensor, double range) throws DeviceException, java.io.IOException
Description copied from interface:MSTMeter
Sets the measurement range for temperature values. The smallest available range containing the specified value will be selected if only discrete options are available.- Specified by:
setTemperatureRange
in interfaceMSTMeter
- Parameters:
sensor
- The sensor this applies torange
- The range to use, in Kelvin- Throws:
DeviceException
- Upon incompatibility with devicejava.io.IOException
- Upon communications error
-
getTemperatureRange
public double getTemperatureRange(int sensor)
Description copied from interface:MSTMeter
Returns the measurement range being used for temperature values.- Specified by:
getTemperatureRange
in interfaceMSTMeter
- Parameters:
sensor
- The sensor this applies to- Returns:
- The range being used, in Kelvin
-
setSensorType
public void setSensorType(int sensor, TCouple.Type type) throws DeviceException, java.io.IOException
Configures the sensor on the TC-08, specifying which type of thermocouple is installed.- Specified by:
setSensorType
in interfaceMSTCouple
- Parameters:
sensor
- Sensor numbertype
- Thermocouple type- Throws:
DeviceException
- Upon instrument errorjava.io.IOException
-
getSensorType
public TCouple.Type getSensorType(int sensor) throws DeviceException, java.io.IOException
Returns the sensor type that the given channel is configured for.- Specified by:
getSensorType
in interfaceMSTCouple
- Parameters:
sensor
- Sensor number- Returns:
- Sensor type
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon instrument error
-
getLineFrequency
public USBTC08.Frequency getLineFrequency()
Returns the line-frequency rejection mode currently in use.- Returns:
- Frequency, 50 Hz or 60 Hz.
-
setLineFrequency
public void setLineFrequency(USBTC08.Frequency frequency) throws DeviceException
Sets the line-frequency rejection mode to be used.- Parameters:
frequency
- 50 Hz or 60 Hz- Throws:
DeviceException
- Upon instrument error
-
getIDN
public java.lang.String getIDN() throws DeviceException
Description copied from interface:Instrument
Returns an identifying String of the instrument.- Specified by:
getIDN
in interfaceInstrument
- Specified by:
getIDN
in classNativeDevice<USBTC08.NativeInterface>
- Returns:
- Identifying String
- Throws:
DeviceException
- Upon incompatibility with device
-
close
public void close() throws DeviceException
Description copied from interface:Instrument
Closes the connection to the instrument.- Specified by:
close
in interfaceInstrument
- Specified by:
close
in classNativeDevice<USBTC08.NativeInterface>
- Throws:
DeviceException
- Upon incompatibility with device
-
getAddress
public Address getAddress()
Description copied from interface:Instrument
Returns any Address object used to connect to this instrument.- Specified by:
getAddress
in interfaceInstrument
- Returns:
- Address object, null if none
-
getName
public java.lang.String getName()
Description copied from interface:Instrument
Returns the name of the instrument or channel.- Specified by:
getName
in interfaceInstrument
- Returns:
- Name
-
-