Today I had to figure out how to read temperature from an Omega HH506RA thermocouple signal conditioner/datalogger. The HH506RA is a nice little unit that reads temperature from two thermocouples (type K, J, N, T, R, S, or E). It can display the temperature on its LCD screen and communicate them to a PC over RS232 or USB. The PC connection is optically isolated, which is very nice because RS232 and USB are both notorious for causing noise problems via ground loops.
I've put information on how to communicate with the unit up here for future reference.
Serial Port Setup
If you're using the USB cable, its actually just a virtual serial port, which will likely show up on your PC as COM1 to COM4. If you're using the RS232 cable, then obviously you need a serial port on the PC. Either way, you need to set the serial port up for 2400 baud, 7 data bits, even parity, 1 stop bit, and no flow control.
To read the temperatures from the unit, send this string over the serial port:
r means the carriage return character (ASCII 13).
n means the newline character (ASCII 10). You'll get back a string that follows this pattern:
TTTTt TTTTtABrn. The first and second
TTTTt groups represent the temperature and thermocouple type for the first and second thermocouple. The
AB section is some miscellaneous information.
TTTT part will be a hexadecimal string representing the temperature in tenths of a degree Celcius. For example,
017A represents 37.8 degrees Celcius. If the number is negative, it will start with a minus sign instead of a space. For example
-00C2 means -19.4 degrees C.
t part represents the thermocouple type (set using the buttons on the HH506RA). The codes go as follows:
According to the document on the NI site, the
A digit above represents Celcius/Fahrenheit while the
B character represents battery. I've only ever seen them as 0 in my testing.
Bringing it all together:
Decoding: The first thermocouple is a type K that is reading -17.8 degrees C. The second thermocouple is a type T reading 70.5 degrees C.
If you send a bad command, you'll get a a response of
Errrn. I've found that to be a handy way to resynchronize communication in case something goes wrong. Just send
rn and read for a response until you see
Errrn. Once you get that response, you know the unit is ready to accept a command again.
The document on the NI forum has some additional details. For example, you can read the unit's ID with the command
%IDRrn. The ID is the set of digits you send in the read temperature command
#001Nrn. You can change the unit's ID so that it responds to
#005Nrn by sending a command along the lines of
%001I005rn. I don't really see the point of this, so I haven't bothered testing it. The unit can log data, which can then be read back with the command