T3311 Class
- ID: t3311
- Name: Temperature and Humidity Probe
- Category: temp
- Manufacturer: comet
- Connection: uart
- Link: http://www.cometsystem.com/products/reg-T3311
This module implements support for the Comet System T3311 Temperature and Humidity transmitter. It uses MODBUS over an RS232 serial port. You must have libmodbus v3.1.2 (or greater) installed to compile and use this driver.
This module was developed using libmodbus 3.1.2, and T3311 Firmware revison 2.66 connected via a Prolific RS232 Serial to USB adaptor. You cannot use the built in TTL UART pins for accessing this device b you must use a full serial RS232 interface connected via USB.
Item Index
Methods
Methods
T3311
-
device
-
address
-
baud
-
bits
-
parity
-
stopBits
T3311 constructor
Parameters:
-
device
StringPath to the serial device
-
address
NumberThe MODBUS slave address
-
baud
NumberThe baudrate of the device. Default: 9600
-
bits
NumberThe number of bits per byte. Default: 8
-
parity
StringThe parity of the connection, 'N' for None, 'E' for Even, 'O' for Odd. Default: 'N'
-
stopBits
NumberThe number of stop bits. Default: 2
Returns:
extendedDataAvailable
()
Boolean
Indicate whether the attached sensor supports extended Computed Data registers. Firmware versions at, or higher than 2.44 provide this data.
Returns:
true if Extended Data is available, false otherwise
update
()
Read current values from the sensor and update internal stored values. This method must be called prior to querying any values, such as temperature or humidity.
getTemperature
-
fahrenheit
Get the current temperature. update() must have been called prior to calling this method.
Parameters:
-
fahrenheit
Booleantrue to return the temperature in degrees fahrenheit, false to return the temperature in degrees celsius. The default is false (degrees Celsius).
Returns:
The last temperature reading in Celsius or Fahrenheit
getHumidity
()
Number
Get the current relative humidity. update() must have been called prior to calling this method.
Returns:
The last humidity reading
getComputedValue
()
Number
Get the current computed value. update() must have been called prior to calling this method. This value is configured via the configuration of the sensor using the sensors configuration utility, and can represent several different computed values. The default value from the factory is the current Dew Point Temperature .
Since the actual value configured is unknown (and unknowable) to this driver, the units represented depend on how you have configured the device. This function simply returns the value without any conversion or interpretation, other than the default scaling.
Returns:
The last Computed Value
getDewPointTemperature
-
fahrenheit
Get the current dew point temperature. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
Parameters:
-
fahrenheit
Booleantrue to return the temperature in degrees fahrenheit, false to return the temperature in degrees celsius. The default is false (degrees Celsius).
Returns:
The last dew point temperature reading in Celsius or Fahrenheit
getAbsoluteHumidity
()
Number
Get the current absolute humidity. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
Returns:
The last absolute humidity reading in g/m3 (grams per cubic meter).
getSpecificHumidity
()
Number
Get the current specific humidity. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
Returns:
The last specific humidity reading in g/kg (grams per kilogram).
getMixingRatio
()
Number
Get the current mixing ratio. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
Returns:
The last mixing ratio reading in g/kg (grams per kilogram).
getSpecificEnthalpy
()
Number
Get the current specific enthalopy, a measure of energy density. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
Returns:
The last specific enthalopy reading in kJ/kg (kilojoules per kilogram).
getSerialNumber
()
String
Get the serial number of the sensor.
Returns:
The serial number
getFirmwareMajor
()
Number
Get the firmware revision major number.
Returns:
The firmware revsion major number.
getFirmwareMinor
()
Number
Get the firmware revision minor number.
Returns:
The firmware revsion minor number.
setDebug
-
enable
Enable or disable debugging output. This primarily enables and disables libmodbus debugging output.
Parameters:
-
enable
Booleantrue to enable debugging, false otherwise