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 classUSBTC08.FrequencyEnumeration of line-frequency rejection modes.protected static interfaceUSBTC08.NativeInterfaceInterface 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 voidclose()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.AddressgetAddress()Returns any Address object used to connect to this instrument.static java.lang.StringgetDescription()java.lang.StringgetIDN()Returns an identifying String of the instrument.USBTC08.FrequencygetLineFrequency()Returns the line-frequency rejection mode currently in use.java.lang.StringgetName()Returns the name of the instrument or channel.java.lang.StringgetName(int sensorNumber)intgetNumSensors()Returns the number of sensors the instrument has.TCouple.TypegetSensorType(int sensor)Returns the sensor type that the given channel is configured for.java.lang.StringgetSerial()Returns the serial number of this unit.doublegetTemperature(int sensor)Returns the temperature being reported by the specified sensor.doublegetTemperatureRange(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.voidsetLineFrequency(USBTC08.Frequency frequency)Sets the line-frequency rejection mode to be used.voidsetSensorType(int sensor, TCouple.Type type)Configures the sensor on the TC-08, specifying which type of thermocouple is installed.voidsetTemperatureRange(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, DeviceExceptionConnects 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, DeviceExceptionConnects 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 DeviceExceptionReturns the serial number of this unit.- Returns:
- Serial number
- Throws:
DeviceException- Upon instrument error.
-
getTemperature
public double getTemperature(int sensor) throws DeviceException, java.io.IOExceptionDescription copied from interface:MSTMeterReturns the temperature being reported by the specified sensor.- Specified by:
getTemperaturein 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:MSTMeterReturns the number of sensors the instrument has.- Specified by:
getNumSensorsin interfaceMSTMeter- Returns:
- Number of sensors
-
getName
public java.lang.String getName(int sensorNumber)
-
getTemperatures
public java.util.List<java.lang.Double> getTemperatures() throws DeviceExceptionDescription copied from interface:MSTMeterReturns temperature readings from all sensors as a List indexed by sensor number.- Specified by:
getTemperaturesin 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.IOExceptionDescription copied from interface:MSTMeterSets 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:
setTemperatureRangein 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:MSTMeterReturns the measurement range being used for temperature values.- Specified by:
getTemperatureRangein 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.IOExceptionConfigures the sensor on the TC-08, specifying which type of thermocouple is installed.- Specified by:
setSensorTypein 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:
getSensorTypein 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 DeviceExceptionDescription copied from interface:InstrumentReturns an identifying String of the instrument.- Specified by:
getIDNin interfaceInstrument- Specified by:
getIDNin classNativeDevice<USBTC08.NativeInterface>- Returns:
- Identifying String
- Throws:
DeviceException- Upon incompatibility with device
-
close
public void close() throws DeviceExceptionDescription copied from interface:InstrumentCloses the connection to the instrument.- Specified by:
closein interfaceInstrument- Specified by:
closein classNativeDevice<USBTC08.NativeInterface>- Throws:
DeviceException- Upon incompatibility with device
-
getAddress
public Address getAddress()
Description copied from interface:InstrumentReturns any Address object used to connect to this instrument.- Specified by:
getAddressin interfaceInstrument- Returns:
- Address object, null if none
-
getName
public java.lang.String getName()
Description copied from interface:InstrumentReturns the name of the instrument or channel.- Specified by:
getNamein interfaceInstrument- Returns:
- Name
-
-