|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.phidgets.Phidget
com.phidgets.TemperatureSensorPhidget
This class represents a Phidget temperature Sensor. All methods to read temperaure data from the sensor are implemented in this class.
The Temperature Phidget consists of a thermocouple interface, and a temperature sensing IC, which is used to measure the temperature of the thermocouple cold junction and calibrate the thermocouple sensed temperature.
Both the thermocouple and temperature IC temperatures can be read. Value are returned in degrees celcius.
Field Summary | |
static int |
PHIDGET_TEMPERATURE_SENSOR_E_TYPE
E-Type Thermocouple. |
static int |
PHIDGET_TEMPERATURE_SENSOR_J_TYPE
J-Type Thermocouple. |
static int |
PHIDGET_TEMPERATURE_SENSOR_K_TYPE
K-Type Thermocouple. |
static int |
PHIDGET_TEMPERATURE_SENSOR_T_TYPE
T-Type Thermocouple. |
Constructor Summary | |
TemperatureSensorPhidget()
|
Method Summary | |
void |
addTemperatureChangeListener(TemperatureChangeListener l)
Adds a temperature change listener. |
double |
getAmbientTemperature()
Returns the temperature of the ambient sensor. |
double |
getAmbientTemperatureMax()
Returns the maximum temperature that will be returned by the ambient sensor. |
double |
getAmbientTemperatureMin()
Returns the minimum temperature that will be returned by the ambient sensor. |
double |
getPotential(int index)
Returns the potential of a thermocouple input. |
double |
getPotentialMax(int index)
Returns the maximum potential that will be returned by a thermocouple input. |
double |
getPotentialMin(int index)
Returns the minimum potential that will be returned by a thermocouple input. |
int |
getSensorCount()
Deprecated. Replaced by getTemperatureInputCount() |
double |
getTemperature(int index)
Returns the temperature of a thermocouple. |
double |
getTemperatureChangeTrigger(int index)
Returns the change trigger for an input. |
int |
getTemperatureInputCount()
Returns the number of thermocouples. |
double |
getTemperatureMax(int index)
Returns the maximum temperature that will be returned by a thermocouple input. |
double |
getTemperatureMin(int index)
Returns the minimum temperature that will be returned by a thermocouple input. |
int |
getThermocoupleType(int index)
Returns the thermocouple type for an input. |
void |
removeTemperatureChangeListener(TemperatureChangeListener l)
|
void |
setTemperatureChangeTrigger(int index,
double newVal)
Sets the change trigger for an input. |
void |
setThermocoupleType(int index,
int type)
Sets the thermocouple type for an input. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PHIDGET_TEMPERATURE_SENSOR_K_TYPE
getThermocoupleType
and setThermocoupleType
public static final int PHIDGET_TEMPERATURE_SENSOR_J_TYPE
getThermocoupleType
and setThermocoupleType
public static final int PHIDGET_TEMPERATURE_SENSOR_E_TYPE
getThermocoupleType
and setThermocoupleType
public static final int PHIDGET_TEMPERATURE_SENSOR_T_TYPE
getThermocoupleType
and setThermocoupleType
Constructor Detail |
public TemperatureSensorPhidget() throws PhidgetException
Method Detail |
public int getTemperatureInputCount() throws PhidgetException
PhidgetException
public int getSensorCount() throws PhidgetException
getTemperatureInputCount()
PhidgetException
public double getTemperature(int index) throws PhidgetException
getTemperatureMin
and getTemperatureMax
.
The accuracy depends on the thermocouple used. The board is calibrated during manufacture.
index
- Index of the thermocouple
PhidgetException
- If this Phidget is not opened and attached, or if a thermocouple sensor is not plugged into the board.
See open
for information on determining if a device is attached.public double getTemperatureMax(int index) throws PhidgetException
index
- Index of the thermocouple
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public double getTemperatureMin(int index) throws PhidgetException
index
- Index of the thermocouple
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public double getAmbientTemperature() throws PhidgetException
getAmbientTemperatureMin
and getAmbientTemperatureMax
.
This is the temperature of the board at the thermocouple cold junction.
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public double getAmbientTemperatureMax() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public double getAmbientTemperatureMin() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public double getPotential(int index) throws PhidgetException
getPotentialMin
and getPotentialMax
.
This is very accurate, as it is a raw value from the A/D. This is the value that is internally used to calculate temperature in the library.
index
- Index of the thermocouple
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public double getPotentialMax(int index) throws PhidgetException
index
- Index of the thermocouple
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public double getPotentialMin(int index) throws PhidgetException
index
- Index of the thermocouple
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public void setTemperatureChangeTrigger(int index, double newVal) throws PhidgetException
index
- InputnewVal
- Trigger
PhidgetException
- If this Phidget is not opened and attached, or if the index is out of range.
See open
for information on determining if a device is attached.public double getTemperatureChangeTrigger(int index) throws PhidgetException
index
- Input
PhidgetException
- If this Phidget is not opened and attached, or if the index is out of range.
See open
for information on determining if a device is attached.public int getThermocoupleType(int index) throws PhidgetException
PHIDGET_TEMPERATURE_SENSOR_K_TYPE
,
PHIDGET_TEMPERATURE_SENSOR_J_TYPE
, PHIDGET_TEMPERATURE_SENSOR_E_TYPE
and
PHIDGET_TEMPERATURE_SENSOR_T_TYPE
index
- Input
PhidgetException
- If this Phidget is not opened and attached, or if the index is out of range.
See open
for information on determining if a device is attached.public void setThermocoupleType(int index, int type) throws PhidgetException
getPotentialMin
and getPotentialMax
) can
be achieved using getPotential
.
The possible values for type are PHIDGET_TEMPERATURE_SENSOR_K_TYPE
,
PHIDGET_TEMPERATURE_SENSOR_J_TYPE
, PHIDGET_TEMPERATURE_SENSOR_E_TYPE
and
PHIDGET_TEMPERATURE_SENSOR_T_TYPE
By default, type is set to PHIDGET_TEMPERATURE_SENSOR_K_TYPE
.
index
- Inputtype
- Thermocouple Type
PhidgetException
- If this Phidget is not opened and attached, or if the index is out of range.
See open
for information on determining if a device is attached.public final void addTemperatureChangeListener(TemperatureChangeListener l)
Trigger
that has been set.
There is no limit on the number of temperature change handlers that can be registered for a particular Phidget.
l
- An implemetation of the TemperatureChangeListener
interfacepublic final void removeTemperatureChangeListener(TemperatureChangeListener l)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |