<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jacques Fortier &#187; Uncategorized</title>
	<atom:link href="http://www.jacquesf.com/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jacquesf.com</link>
	<description></description>
	<lastBuildDate>Tue, 23 Mar 2010 03:58:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Omega HH506RA Serial Protocol</title>
		<link>http://www.jacquesf.com/blog/2010/03/omega-hh506ra-serial-protocol/</link>
		<comments>http://www.jacquesf.com/blog/2010/03/omega-hh506ra-serial-protocol/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 03:30:06 +0000</pubDate>
		<dc:creator>Jacques</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jacquesf.com/?p=187</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>I&#8217;ve put information on how to communicate with the unit up here for future reference.</p>
<p><span id="more-187"></span></p>
<p>I found some information <a href="http://forums.ni.com/ni/board/message?board.id=140&amp;thread.id=25547">on an NI forum</a> and on <a href="http://www.mathworks.com/matlabcentral/fileexchange/11739-omega-hh506ra-read">Matlab&#8217;s file exchange site.</a>. The info on the NI site is a bit hard to read and not quite correct, so here&#8217;s a quick and clear rundown.</p>
<p><b>Serial Port Setup</b></p>
<p>If you&#8217;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&#8217;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.</p>
<p><b>Communication Overview</b></p>
<p>To read the temperatures from the unit, send this string over the serial port: &#8220;#001N\r\n&#8221;. Don&#8217;t include the quote marks. \r means the carriage return character (ASCII 13). \n means the newline character (ASCII 10). You&#8217;ll get back a string that follows this pattern: &#8221; TTTTt TTTTtAB\r\n&#8221;. 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.</p>
<p><b>Temperature</b></p>
<p>The &#8220;TTTT&#8221; part will  be a hexadecimal string representing the temperature in tenths of a degree Celcius. For example, &#8221; 017A&#8221; represents 37.8 degrees Celcius. If the number is negative, it will start with a minus sign instead of a space. For example &#8220;-00C2&#8243; means -19.4 degrees C.</p>
<p><b>Thermocouple Type</b></p>
<p>The &#8220;t&#8221; part represents the thermocouple type (set using the buttons on the HH506RA). The codes go as follows:</p>
<table>
<tbody>
<tr>
<th>Code</th>
<th>Type</th>
</tr>
<tr>
<td>0</td>
<td>K</td>
</tr>
<tr>
<td>1</td>
<td>J</td>
</tr>
<tr>
<td>2</td>
<td>T</td>
</tr>
<tr>
<td>3</td>
<td>E</td>
</tr>
<tr>
<td>4</td>
<td>N</td>
</tr>
<tr>
<td>5</td>
<td>R</td>
</tr>
<tr>
<td>6</td>
<td>S</td>
</tr>
</tbody>
</table>
<p><b>Miscellaneous Info</b></p>
<p>According to the document on the NI site, the &#8220;A&#8221; digit above represents Celcius/Fahrenheit while the &#8220;B&#8221; character represents battery. I&#8217;ve only ever seen them as 0 in my testing.</p>
<p><b>Example</b></p>
<p>Bringing it all together:<br />
You send: &#8220;#001N\r\n&#8221;<br />
You receive: &#8220;-00B20 02C1200\r\n&#8221;<br />
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.</p>
<p><b>Errors</b></p>
<p>If you send a bad command, you&#8217;ll get a a response of &#8220;Err\r\n&#8221;. I&#8217;ve found that to be a handy way to resynchronize communication in case something goes wrong. Just send &#8220;\r\n&#8221; and read for a response until you see &#8220;Err\r\n&#8221;. Once you get that response, you know the unit is ready to accept a command again.</p>
<p><b>Other Commands</b></p>
<p>The document on the NI forum has some additional details. For example, you can read the unit&#8217;s ID with the command &#8220;%IDR\r\n&#8221;. The ID is the set of digits you send in the read temperature command &#8220;#001N\r\n&#8221;. You can change the unit&#8217;s ID so that it responds to &#8220;#005N\r\n&#8221; by sending a command along the lines of &#8220;%001I005\r\n&#8221;. I don&#8217;t really see the point of this, so I haven&#8217;t bothered testing it. The unit can log data, which can then be read back with the command &#8220;#001S\r\n&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacquesf.com/blog/2010/03/omega-hh506ra-serial-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Definitely in favor of padded shorts</title>
		<link>http://www.jacquesf.com/blog/2009/08/definitely-in-favor-of-padded-shorts/</link>
		<comments>http://www.jacquesf.com/blog/2009/08/definitely-in-favor-of-padded-shorts/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 01:40:08 +0000</pubDate>
		<dc:creator>Jacques</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jacquesf.com/?p=185</guid>
		<description><![CDATA[I got some padded shorts last week, which was definitely a good move. Things were already painful enough last weekend after a 39 mile ride. This week I went for 45 miles on the same route and felt pretty good through the whole thing. Well, I felt like I was going to keel over and [...]]]></description>
			<content:encoded><![CDATA[<p>I got some padded shorts last week, which was definitely a good move. Things were already painful enough last weekend after a 39 mile ride. This week I went for 45 miles on the same route and felt pretty good through the whole thing. Well, I felt like I was going to keel over and die after 40 miles, but at least my ass wasn&#8217;t in pain too.</p>
<p>The stats: 45 miles, average speed 13.1 mph (half a mph better than on last week&#8217;s 39 mile ride!), max speed 27.6 mph again (downhill of course), riding time 3h23, total time something like 4 hours.</p>
<p>Once you get off the bike path, people get a lot friendlier. I got a bunch of nods from other cyclists biking around Carlisle. While struggling my way up at 8-9 mph what the <a href="http://www.crw.org/cgi-bin/calendar.pl/?thismonth=yes">CRW site</a> describes as a &#8220;mild rolling&#8221; hill I even got a big smile and a wave.</p>
<p>Click more for the map.</p>
<p><span id="more-185"></span></p>
<p><iframe width="600" height="500" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;source=embed&amp;msa=0&amp;msid=111798079151102324755.00047147b9e7574cdbf7d&amp;ll=42.471084,-71.267624&amp;spn=0.253241,0.411987&amp;z=11&amp;output=embed"></iframe><br /><small>View <a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;source=embed&amp;msa=0&amp;msid=111798079151102324755.00047147b9e7574cdbf7d&amp;ll=42.471084,-71.267624&amp;spn=0.253241,0.411987&amp;z=11" style="color:#0000FF;text-align:left">Bike Route 2009-08-16</a> in a larger map</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacquesf.com/blog/2009/08/definitely-in-favor-of-padded-shorts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
