Reading Internal Temperature Sensor
Posted 04 January 2012 - 02:51 AM
Posted 04 January 2012 - 09:08 AM
Reading the internal temp sensor is just like a normal analog input read. You read channel 14, and instead of voltage you get back degrees K:
You can use add/go/get (Section 4.3.3), eGet (like your code), or eAIN (Section 4.3.9).
Errorcode 25 is actually "stream is active". You can't read analog inputs in command/response mode while a stream is active. Also note that you can't read the internal temp sensor in a stream on the U6 (it settles too slow).
Posted 04 January 2012 - 07:03 PM
Posted 05 January 2012 - 09:15 AM
Looks like a CHT sensor is a thermocouple? You can read that fine in stream mode, especially since you are actually reading the output of the LJTIA. So you have to add the t/c channel to your stream and then average or decimate the extra data.
Posted 05 January 2012 - 06:43 PM
Yes the CHT is a K Type Thermocouple. Don't I need the LabJack internal temperature for cold junction temperature? Below is what the http://labjack.com/s...IAdatasheet.pdf states...
The UD driver for Windows has a convenient function that takes in thermocouple type, thermocouple voltage, and cold junction temperature, and returns the thermocouple temperature. The following pseudocode demonstrates a measurement:
//Read the amplified and offset thermocouple voltage from an analog input.
eGet (lngHandle, LJ_ioGET_AIN, tcChannel, &valueAIN, 0);
//Get the internal temperature reading (channel 133 on the UE9 or channel 30 on the U3).
eGet (lngHandle, LJ_ioGET_AIN, internalTempChannel, &cjTempK, 0);
//To get the thermocouple voltage we subtract the offset from the AIN voltage
//and divide by the LJTIA gain.
tcVolts = (valueAIN - offsetVoltage)/51;
//Convert TC voltage to temperature.
TCVoltsToTemp (LJ_ttK, tcVolts, cjTempK, &TCTempK);
I have decided the the Scooter Computer will have modes, so I will simply switch to a mode where streaming is not required. That will solve this issue and probably future ones
Posted 06 January 2012 - 10:04 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users