<?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>Chipkin Automation Systems - Articles &#187; Uncategorized</title>
	<atom:link href="http://www.chipkin.com/articles/category/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://www.chipkin.com/articles</link>
	<description>Resources and News for industrial automation</description>
	<lastBuildDate>Thu, 02 Feb 2012 15:25:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using Eclipse with Arduino Duemilanove</title>
		<link>http://www.chipkin.com/articles/using-eclipse-with-arduino-duemilanove</link>
		<comments>http://www.chipkin.com/articles/using-eclipse-with-arduino-duemilanove#comments</comments>
		<pubDate>Fri, 05 Mar 2010 22:14:32 +0000</pubDate>
		<dc:creator>Steven Smethurst</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[WinAVR]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=590</guid>
		<description><![CDATA[The Arduino IDE is good for simple projects, but as soon as you start building more complex multi file projects it just not up to the job. Eclipse on the other hand is free, powerful, and full-featured development environment that can be set up to work with AVR and Arduino. Arduino&#8217;s website has some decent instructions on [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.arduino.cc/en/Main/Software">Arduino IDE</a> is good for simple projects, but as soon as you start building more complex multi file projects it just not up to the job. <a href="http://www.eclipse.org/">Eclipse</a> on the other hand is free, powerful, and full-featured development environment that can be set up to work with <a href="http://www.atmel.com/products/AVR/">AVR</a> and <a href="http://www.arduino.cc/">Arduino</a>. Arduino&#8217;s website has some decent instructions on <a href="http://www.arduino.cc/playground/Code/Eclipse">how to compile with Eclipse for Arduino</a> but its has some missing/confusing steps and is meant for C development not C++. It still has some good reference material that you should review.</p>
<p>In this tutorial we will be showing you how to set up the eclipse environment, Build the Arduino library, Create a Arduino project, Compiling C/C++ code, Uploading code to the Arduino, FAQ. This tutorial was created in response to <a href="http://vancouver.hackspace.ca/doku.php?id=hack_challenge">VHS Hack Challenge</a>.</p>
<h3><span style="text-decoration: underline;">Setting up the Eclipse environment</span></h3>
<p><strong>Download<br />
<span style="font-weight: normal;">You may</span><span style="font-weight: normal;"> not be able to find the exact versions that are used in this tutorial, just you the most updated versions. </span></strong></p>
<div id="_mcePaste">
<ul>
<li><a href="http://java.com/">Java Runtime 5</a> or higher &#8211; Most likely you will already have this installed on your computer.</li>
<li><a href="http://www.eclipse.org/downloads/">Eclipse IDE for C/C++ Developers (~79 MB)</a> - For this tutorial we&#8217;ll be using <em>Build id: 20090920-1017.</em></li>
<li><a href="http://arduino.cc/en/Main/Software">Arduino software</a> - For this tutorial we will be using <em>Arduino 0018.</em></li>
<li><a href="http://sourceforge.net/projects/avr-eclipse/">Eclipse AVR plugin</a> - For this tutorial we will be using <em>version 2.3.1</em></li>
<li><a href="http://winavr.sourceforge.net/">WinAVR</a> -  For this tutorial we will be using <em>WinAVR-20100110</em></li>
</ul>
</div>
<div><strong>Installation </strong></div>
<div>
<ul>
<li>Install <strong>Java runtime</strong>. Most computers will already have Java installed as it is used for many other applications.</li>
<li>Install <strong>Arduino software</strong>. The Arduino software comes with the Arduino library and source code examples that will be useful when developing your own projects.</li>
<li>Install <strong>Eclipse</strong>. This should be pretty straight forward. You can install Eclipse in any directory you want. For this tutorial we installed it in <em>C:\Dev\eclipse-cpp</em></li>
<li>Install <strong>WinAVR</strong>, You can install WinAVR in any directory you want. For this tutorial we installed it in <em>C:\Dev\WinAVR-20100110</em></li>
<li>Install <strong>Eclipse AVR plugin</strong>. You will have to manually copy this &#8220;plugin&#8221; into the the Eclipse installation. Move the folder which begins with the name &#8220;de.innot.avreclipse&#8221; to the &#8220;dropins&#8221; folder located within the eclipse folder. Restart Eclipse if you have it already running. There should now be a new &#8220;AVR&#8221; toolbar button in your workspace.</li>
</ul>
</div>
<h3><span style="text-decoration: underline;">Build the Arduino library</span></h3>
<p>Before we can create our first Arduino project we have to link in the Arduino library for Eclipse. There are several different ways of doing this described on <a href="http://www.arduino.cc/playground/Code/Eclipse">Eclipse for Arduino</a> tutorial but for this tutorial we will be creating a static library.</p>
<p>You can <a href="http://www.chipkin.com/articles/wp-content/uploads/2010/03/ArduinoCoreProject_2010-03-05_115518.zip">download the project</a> and the <a href="http://www.chipkin.com/articles/wp-content/uploads/2010/03/libArduinoCore_2010-03-05_115644.zip">library</a> directly and skip this step.</p>
<ol>
<li>Open Eclipse and start a new C++ project.</li>
<li><a href="http://www.chipkin.com/articles/wp-content/uploads/2010/03/eclipse_new_project.png"><img class="alignright size-thumbnail wp-image-592" style="border: 0px initial initial;" title="new_project" src="http://www.chipkin.com/articles/wp-content/uploads/2010/03/eclipse_new_project-150x150.png" alt="" width="150" height="150" /></a>C++ Project
<ul>
<li><strong>Project Name:</strong> <em>ArduinoCore</em></li>
<li><strong>Project Type:</strong> <em>AVR Cross Target Static Libary</em></li>
<li><strong>Toolchains:</strong> <em>AVR-GCC Toolchain<br />
</em></li>
</ul>
</li>
<li>Select Configurations, Uncheck debug we will not be using the debug version of this library in this tutorial.</li>
<li><a href="http://www.chipkin.com/articles/wp-content/uploads/2010/03/avr_target_hardware.png"><img class="alignright size-thumbnail wp-image-593" title="avr_target_hardware" src="http://www.chipkin.com/articles/wp-content/uploads/2010/03/avr_target_hardware-150x150.png" alt="" width="150" height="150" /></a>Set the MCU type and frequency for your Arduino board. For example, for the Diecimila, use <strong>ATmega168 </strong>running at <strong>16000000 </strong>Hz. For new versions of the Duemilanove, use <strong>ATmega328P </strong>running at <strong>16000000 </strong>Hz. If you look closely at the Arduino board, you can see the target platform written on the main processor. Click Finish.</li>
<li>In Eclipse, click Project-&gt;Properties.</li>
<li>Select C/C++ Build and expand the category (e.g., click the diamond to the left of &#8220;C/C++ Build&#8221;).</li>
<li>Select Settings under C/C++ Build.</li>
<li><a href="http://www.chipkin.com/articles/wp-content/uploads/2010/03/eclipse_project_settings.png"><img class="alignright size-thumbnail wp-image-595" title="eclipse_project_settings" src="http://www.chipkin.com/articles/wp-content/uploads/2010/03/eclipse_project_settings-150x150.png" alt="" width="150" height="150" /></a>In the right pane, Click AVR Compiler
<ul>
<li>Debugging. Set &#8220;Generate Debugging Info&#8221; to No debugging info.</li>
</ul>
<ul>
<li>Optimization. Set the Optimization Level to &#8220;Size Optimizations&#8221;.</li>
<li>Directories, Add the path to the Arduino IDE&#8217;s Hardware folder <em>&#8220;Arduino-0018\hardware\arduino\cores\arduino&#8221; </em></li>
</ul>
</li>
<li>In the right pane, Click AVR C++ Compiler
<ul>
<li>Debugging. Set &#8220;Generate Debugging Info&#8221; to No debugging info.</li>
</ul>
<ul>
<li>Optimization. Set the Optimization Level to &#8220;Size Optimizations&#8221;.</li>
<li>Directories, Add the path to the Arduino IDE&#8217;s Hardware folder <em>&#8220;Arduino-0018\hardware\arduino\cores\arduino&#8221; </em></li>
</ul>
</li>
<li>Right click on the ArduinoCore project in the project explorer on the right and select Import.</li>
<li>On the <em>Import</em> dialog, select <em>General </em>=&gt; <em>File System</em> and click next.</li>
<li>On the <em>File system</em> dialog click browse and select the Arduino IDE&#8217;s hardware folder  <em>&#8220;Arduino-0018\hardware\arduino\cores\arduino&#8221; </em></li>
<li>Select all the files except <em>main.cpp</em>. Click finish</li>
<li>Build the project, On the mail dialog click the hammer in the too bar or by selecting <strong>Project </strong>=&gt;<strong>Build All</strong>.</li>
</ol>
<p>Congratulations you have created the Arduino C/C++ library for Eclipse.  The library ( <em>libArduinoCore.a</em> ) can be found in the projects release folder. It should be around 26k</p>
<p><strong>Path:</strong> <em>\workspace\ArduinoCore\Release\libArduinoCore.a</em></p>
<h3><strong><span style="text-decoration: underline;">Creating a Arduino project</span></strong></h3>
<p>Now that we have the Arduino library we can build our first Arduino project. We are going to start with the <a href="http://arduino.cc/en/Tutorial/Blink">Blink tutorial</a> from <a href="http://arduino.cc/">Arduino.cc</a> its one of the simplest tutorials and should be a good building block for future projects.</p>
<p>You can download the <a href="http://www.chipkin.com/articles/wp-content/uploads/2010/03/Blinky_2010-03-05_135311.zip">project for this tutorial</a> from our website.</p>
<ol>
<li>Create a new Eclipse C++ project, <strong>File</strong> =&gt; <strong>New</strong> =&gt; <strong>C++ project</strong></li>
<li>C++ Project
<ul>
<li><strong>Project Name: </strong><em>Blinky</em></li>
</ul>
<ul>
<li><strong>Project Type: </strong><em>AVR Cross Target Application =&gt; Empty project </em></li>
</ul>
<ul>
<li><strong>Toolchains:</strong><em> AVR-GCC Toolchain</em></li>
</ul>
</li>
<li>Select Configurations, Uncheck debug we will not be using the debug version in this tutorial.</li>
<li>Set the MCU type and frequency for your Arduino board. For example, for the Diecimila, use <strong>ATmega168 </strong>running at <strong>16000000 </strong>Hz. For new versions of the Duemilanove, use <strong>ATmega328P</strong> running at <strong>16000000 </strong>Hz. If you look closely at the Arduino board, you can see the target platform written on the main processor. Click Finish.</li>
<li>In Eclipse, click <strong>Project =</strong>&gt; <strong>Properties</strong>.</li>
<li>Select C/C++ Build and expand the category (e.g., click the diamond to the left of &#8220;C/C++ Build&#8221;).</li>
<li>Select <strong>Settings </strong>under <strong>C/C++ Build</strong>.</li>
<li>In the right pane, Click Additional Tools in Toolchain
<ul>
<li>Check <strong>Generate HEX file for flash memory </strong></li>
<li>Check <strong>Print size </strong></li>
</ul>
</li>
<li>In the right pane, Click <strong>AVR Compiler</strong>
<ul>
<li>Debugging. Set <strong>Generate Debugging Info</strong> to &#8220;No debugging info&#8221;.</li>
</ul>
<ul>
<li>Optimization. Set the <strong>Optimization Level</strong> to &#8220;Size Optimizations&#8221;.</li>
</ul>
<ul>
<li>Directories, Add the path to the Arduino IDE&#8217;s Hardware folder <em>&#8220;Arduino-0018\hardware\arduino\cores\arduino&#8221;</em></li>
</ul>
</li>
<li>In the right pane, Click <strong>AVR C++ Compiler</strong>
<ul>
<li>Debugging. Set <strong>Generate Debugging Info</strong> to &#8220;No debugging info&#8221;.</li>
</ul>
<ul>
<li>Optimization. Set the <strong>Optimization Level</strong> to &#8220;Size Optimizations&#8221;.</li>
</ul>
<ul>
<li>Directories, Add the path to the Arduino IDE&#8217;s Hardware folder <em>&#8220;Arduino-0018\hardware\arduino\cores\arduino&#8221;</em></li>
</ul>
</li>
<li>In the right pane, Click <strong>AVR C++ Linker</strong>
<ul>
<li><strong>Command</strong>: <em>avr-gcc</em></li>
<li><em><strong>Command line pattern</strong>: </em><em>${COMMAND} &#8211;cref -s -Os ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -lm ${FLAGS}</em> *NOTE &#8212; is two short dashes (- &#8211; with out the space) not a single long dash, WordPress auto converts two short dashes to a single dash  </li>
</ul>
</li>
<li>In the right pane, Click <strong>AVR C++ Linker</strong> =&gt; <strong>Libraries </strong>
<ul>
<li>Add your Arduino library created above &#8220;<em>ArduinoCore</em>&#8220;, The name of the library does not include the extension or the pretext of &#8216;lib&#8217;.  Note: In this project I copied the library in to the base folder of the Blinky project for simplicity.</li>
</ul>
</li>
<li>Create a new source file,  <strong>File</strong> =&gt; <strong>New</strong> =&gt; <strong>Source file</strong>, Call it main.cpp</li>
<li>Copy the contents of this file <a href="http://www.chipkin.com/articles/wp-content/uploads/2010/03/main.txt">main.cpp</a> in to main.cpp</li>
<li>Build the project, On the mail dialog click the hammer in the too bar or by selecting <strong>Project </strong>=&gt;<strong>Build All</strong>.</li>
</ol>
<h3><span style="text-decoration: underline;">Uploading code to the Arduino</span></h3>
<p>Lucky there is already a tool for this built in to AVR plugin for Eclipse called <a href="http://savannah.nongnu.org/projects/avrdude/">AVRDude</a>. It should already be included with the AVR plugin for Eclipse so you shouldn&#8217;t have to download or install anything else.</p>
<ol>
<li>In Eclipse, click <strong>Project =</strong>&gt;<strong>Properties</strong>.</li>
<li>On the left hand side <strong>AVR</strong> =&gt; <strong>AVRDude </strong></li>
<li>You will need to create a new <em>programmer configuration</em> for your board but you only have to do this once.  Click <strong>New</strong></li>
<li><strong><span style="font-weight: normal;">New programmer configuration </span></strong>
<ul>
<li><strong>Configuration Name: </strong>Arduino Duemilanove</li>
</ul>
<ul>
<li><strong>Programmer Hardware<span style="font-weight: normal;">: Atmel STK500 Version 1.x Firmware</span></strong></li>
</ul>
<ul>
<li><strong><span style="font-weight: normal;">Override default port</span><span style="font-weight: normal;">: <em>//./COM14<br />
<span style="font-style: normal;">Note:  you will have to change this to your comport.) </span></em></span></strong></li>
<li><strong><span style="font-weight: normal;"><em><span style="font-style: normal;"><strong><span style="font-weight: normal;">Override default baudrate</span><span style="font-weight: normal;">: 57600</span></strong></span></em></span></strong></li>
</ul>
</li>
<li>Click OK,</li>
<li>On the AVRDude dialog select <strong>Advanced</strong></li>
<li>Check &#8220;Disable Device signature check&#8221; and click OK</li>
<li>Highlight Blinky in the project explorer and click <strong>AVR</strong> =&gt; <strong>Upload to target device</strong> or the AVR icon with the green downward arrow.<br />
<a href="http://www.chipkin.com/articles/wp-content/uploads/2010/03/AVRDude_upload.png"><img class="aligncenter size-full wp-image-606" title="AVRDude_upload" src="http://www.chipkin.com/articles/wp-content/uploads/2010/03/AVRDude_upload.png" alt="" width="532" height="381" /></a></li>
<li><strong><span style="font-weight: normal;">The results will be printed in the console. </span></strong></li>
</ol>
<blockquote><p>Launching C:\Dev\WinAVR-20100110\bin\avrdude -pm16 -cstk500v1 -P//./COM14 -b57600 -F -Uflash:w:Blinky.hex:a<br />
Output:</p>
<p>avrdude: AVR device initialized and ready to accept instructions</p>
<p>Reading | ################################################## | 100% 0.05s</p>
<p>avrdude: Device signature = 0x1e950f<br />
avrdude: Expected signature for ATMEGA16 is 1E 94 03<br />
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed<br />
To disable this feature, specify the -D option.<br />
avrdude: erasing chip<br />
avrdude: reading input file &#8220;Blinky.hex&#8221;<br />
avrdude: input file Blinky.hex auto detected as Intel Hex<br />
avrdude: writing flash (1158 bytes):</p>
<p>Writing | ################################################## | 100% 0.61s</p>
<p>avrdude: 1158 bytes of flash written<br />
avrdude: verifying flash memory against Blinky.hex:<br />
avrdude: load data flash data from input file Blinky.hex:<br />
avrdude: input file Blinky.hex auto detected as Intel Hex<br />
avrdude: input file Blinky.hex contains 1158 bytes<br />
avrdude: reading on-chip flash data:</p>
<p>Reading | ################################################## | 100% 0.52s</p>
<p>avrdude: verifying &#8230;<br />
avrdude: 1158 bytes of flash verified</p>
<p>avrdude done.  Thank you.</p></blockquote>
<p>Congratulation you have uploaded your source code to the Arduino.</p>
<h3><span style="text-decoration: underline;">FAQ</span></h3>
<p><strong>Q: </strong>I keep getting this error message when I upload code with AVRDude to the Arduino.</p>
<blockquote><p>avrdude: stk500_getsync(): not in sync: resp=0&#215;00<br />
avrdude done.  Thank you.</p></blockquote>
<p><strong>A:</strong> Disconnect and reconnect your Arduino and try again</p>
<h3><strong><span style="text-decoration: underline;">More help</span></strong></h3>
<p>For more help with setting up Eclipse to work with Arduino see these two posts on the subject</p>
<ul>
<li><a href="http://robertcarlsen.net/2009/10/31/arduino-in-eclipse-989">Arduino in Eclipse</a></li>
<li><a href="http://www.arduino.cc/playground/Code/Eclipse">Arduino playground: Eclipse</a></li>
</ul>
<p>If you have any other questions or suggestion on how to improve this article, please leave a comment.</p>
<p><strong><span style="color: #ff0000;">Update:</span></strong></p>
<blockquote><p><strong>DubiousTech:</strong><br />
First error I got was with the linker command line pattern. I got a compiler error “avr-gcc.exe: –cref: No such file or directory”. It looks like the “–cref” should be “–cref”. After changing that I got a different error saying “ld.exe: cannot find -lArduinoCore”. Eventually, after trying just about everything I could think of I discovered that I needed both the name of the library in the “-l” box and the file location in the “-L” box. This might very well be a simple mistake, but it’s not clear to a novice.</p></blockquote>
<blockquote><p><strong>Steve:</strong><br />
You’ve got to update this post so the dash in front of “cref” is actually two dashes</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/using-eclipse-with-arduino-duemilanove/feed</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Chipkin &#8211; BACnet Vendor ID</title>
		<link>http://www.chipkin.com/articles/chipkin-bacnet-vendor-id</link>
		<comments>http://www.chipkin.com/articles/chipkin-bacnet-vendor-id#comments</comments>
		<pubDate>Wed, 21 Oct 2009 00:04:37 +0000</pubDate>
		<dc:creator>pchipkin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ASHRAE]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/chipkin-bacnet-vendor-id</guid>
		<description><![CDATA[ASHRAE has allocated Chipkin Automation Systems Inc a ASHRAE Vendor ID of 389.]]></description>
			<content:encoded><![CDATA[<p>ASHRAE has allocated Chipkin Automation Systems Inc a ASHRAE Vendor ID of 389.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/chipkin-bacnet-vendor-id/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unpacking Bits from a 16bit Register in a FieldServer Configuration</title>
		<link>http://www.chipkin.com/articles/unpacking-bits-from-a-16bit-register-in-a-fieldserver-configuration</link>
		<comments>http://www.chipkin.com/articles/unpacking-bits-from-a-16bit-register-in-a-fieldserver-configuration#comments</comments>
		<pubDate>Fri, 14 Aug 2009 18:15:18 +0000</pubDate>
		<dc:creator>pchipkin</dc:creator>
				<category><![CDATA[FieldServer]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[16]]></category>
		<category><![CDATA[16-bit]]></category>
		<category><![CDATA[16bit]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[bit]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[register]]></category>
		<category><![CDATA[unpack]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=437</guid>
		<description><![CDATA[Introduction What happens if you want to serve some/all of the bits that form a 16 bit register. ie. Your client reads a 16bit register but you want to serve those bits as separate binary objects. Here is an example Lets say the client reads 40001 data into DA_REG[0] (Data Array = DA_REG Offset=0) The [...]]]></description>
			<content:encoded><![CDATA[<h4 style="border-bottom: 1px solid #8cacbb;">Introduction</h4>
<p>What happens if you want to serve some/all of the bits that form a 16 bit register. ie. Your client reads a 16bit register but you want to serve those bits as separate binary objects.</p>
<h4 style="border-bottom: 1px solid #8cacbb;">Here is an example</h4>
<div>Lets say the client reads 40001 data into DA_REG[0] (Data Array = DA_REG Offset=0)</p>
<p>The 1<sup>st</sup> Move copies 1x 16 bit number from DA_REG[0] to DA_PACKED[0].</p>
<p>DA_Packed’s offsets can be interpreted in two ways:</p></div>
<ul>
<li>A series of 16 bit numbers</li>
<li>A series of bits</li>
</ul>
<p>It depends on what kind of operation access the Data Array. If it’s a 16 bit or analog number type operation then it addesses 16 bit numbers. If the operation is a bit operation like for a binary data point then the operation addresses each bit.</p>
<p>Therefore DA_PACKED[0] is ambiguous.</p>
<p>If you connected a server Map Descriptor to that point and the type is an Analog In/output then it means the 16bit number found at DA_PACKED[0].</p>
<p>If you connected a server Map Descriptor to that point and the type is an Binary In/output then it means the bit number found at DA_PACKED[0] and DA_PACKED[15] is the 16<sup>th</sup> bit. DA_PACKED[16] is the 1<sup>st</sup> bit of the next 16 bit number&#8230;</p>
<p>If that seems to complicated then add one more move:</p>
<p>Data_Arrays</p>
<table border="0">
<tbody>
<tr>
<td>Move_Only</td>
<td>DA_PACKED</td>
<td>0</td>
<td>DA_BIT</td>
<td>0</td>
<td>16</td>
</tr>
</tbody>
</table>
<p>This move moves the 16 bits for DA_PACKED[0] to 16 separate bits with unambiguous offsets and you can use those in the server map descriptors.</p>
<h4 style="border-bottom: 1px solid #8cacbb;">Heads Up</h4>
<div>Some Modbus server devices number the bits in reverse order. You can only be sure when you test.</div>
<div>
Data_Arrays</div>
<table border="0" cellpadding="2">
<tbody>
<tr>
<td>Data_Array_Name</td>
<td>Data_Format</td>
<td>Data_Array_Length</td>
</tr>
<tr>
<td>DA_REG</td>
<td>UINT16</td>
<td>20</td>
</tr>
<tr>
<td>DA_PACKED</td>
<td>Packed_Bit</td>
<td>100</td>
</tr>
<tr>
<td>DA_BIT</td>
<td>BIT</td>
<td>1200</td>
</tr>
</tbody>
</table>
<p>Preloads</p>
<table border="0" cellpadding="2">
<tbody>
<tr>
<td>Data_Array_Name</td>
<td>Preload_Data_Index</td>
<td>Preload_Data_Value</td>
</tr>
<tr>
<td>DA_REG</td>
<td>0</td>
<td>33</td>
</tr>
</tbody>
</table>
<p>Moves</p>
<table border="0" cellpadding="2">
<tbody>
<tr>
<td>Function</td>
<td>Source_Data_Array</td>
<td>Source_Offset</td>
<td>Target_Data_Array</td>
<td>Target_Offset</td>
<td>Length</td>
</tr>
<tr>
<td>Move_Only</td>
<td>DA_REG</td>
<td>0</td>
<td>DA_PACKED</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>Move_Only</td>
<td>DA_PACKED</td>
<td>0</td>
<td>DA_BIT</td>
<td>0</td>
<td>16</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/unpacking-bits-from-a-16bit-register-in-a-fieldserver-configuration/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some of the controls on this property sheet are disabled&#8230;</title>
		<link>http://www.chipkin.com/articles/some-of-the-controls-on-this-property-sheet-are-disabled</link>
		<comments>http://www.chipkin.com/articles/some-of-the-controls-on-this-property-sheet-are-disabled#comments</comments>
		<pubDate>Wed, 29 Jul 2009 19:03:08 +0000</pubDate>
		<dc:creator>llucica</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Utilities and tools]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=414</guid>
		<description><![CDATA[While attempting to change the IP address on my network card I get the following error message. &#8220;Some of the controls on this property sheet are disabled because one or more other Network property sheets are already open&#8221; Steps to reproduce: Open &#8220;network connections&#8221; from the control panel. Right click on &#8220;Local Area Connection&#8221; and [...]]]></description>
			<content:encoded><![CDATA[<p>While attempting to change the IP address on my network card I get the following error message.</p>
<blockquote><p><em>&#8220;Some of the controls on this property sheet are disabled because one or more other Network property sheets are already open&#8221;</em></p></blockquote>
<p><strong>Steps to reproduce:</strong></p>
<ol>
<li>Open &#8220;network connections&#8221; from the control panel.</li>
<li>Right click on &#8220;Local Area Connection&#8221; and click &#8220;properties&#8221;</li>
</ol>
<p><strong>Resolution:</strong></p>
<ol>
<li>Download drivers for your current network card.</li>
<li>Uninstall all your networks cards from  (Control panel-&gt;System-&gt;Device manager)</li>
<li>Restart your computer.</li>
<li>Let windows attempt to install your network card for you. If windows can not find the correct network card drivers use the one you downloaded in step 1.</li>
</ol>
<p>If you are still having problems you could try;</p>
<ul>
<li>Uninstall all network related applications, eg <a href="http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-45933-1&amp;lc=en&amp;dlc=en&amp;cc=us&amp;product=1842189&amp;os=228">HP wireless assistant</a>, HP wlan assistant, ect&#8230;</li>
<li>Uninstall all virtual machine applications, eg <a href="http://www.vmware.com/">VMWare</a>, <a href="http://www.virtualbox.org/">Virtual box</a>, ect&#8230;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/some-of-the-controls-on-this-property-sheet-are-disabled/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Node Offline Responses</title>
		<link>http://www.chipkin.com/articles/node-offline-responses</link>
		<comments>http://www.chipkin.com/articles/node-offline-responses#comments</comments>
		<pubDate>Mon, 01 Jun 2009 12:52:36 +0000</pubDate>
		<dc:creator>skapoor</dc:creator>
				<category><![CDATA[FieldServer]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Client]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Map Descriptors]]></category>
		<category><![CDATA[Nodes]]></category>
		<category><![CDATA[Offline]]></category>
		<category><![CDATA[Online]]></category>
		<category><![CDATA[Response]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=390</guid>
		<description><![CDATA[When a Client Node on the FieldServer goes offline the corresponding data objects on the FieldServer are also marked offline. If a client polls a virtual FieldServer node for this particular data, an offline response will be returned by the FieldServer. If the client then requests the FieldServer to identify itself, a valid response will [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;" mce_style="margin-bottom: 0.0001pt; line-height: normal;"><span>When a <strong>Client Node</strong> on the <strong>FieldServer</strong> goes offline the corresponding data objects on the FieldServer are also marked offline. If a client polls a virtual FieldServer node for this particular data, an offline response will be returned by the FieldServer. If the client then requests the FieldServer to identify itself, a valid response will be provided in spite of the data being offline. This results in status toggle, with the Server side Client receiving no replies to data requests and marking the Node offline and then again marking the node online after a successful identification poll, then again receiving no replies to data requests and marking the node offline and so on.</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;" mce_style="margin-bottom: 0.0001pt; line-height: normal;"><span>The <strong>Server Node</strong> must therefore be capable of deciding the nature of its response based on the status of relevant Client Nodes. This can be accomplished using responsible Map Descriptors (RDBC, WRBX, and WRBC). In case no acknowledgement of these functions is received, the device is identified as offline and a flag is placed at the data array offset. The virtual FieldServer can be configured using the <span>Offline_Method </span>option to respond to identification requests in one of the following ways:</span></p>
<ol>
<li><! [if !supportLists] ><strong><span>Ignore_Clients/No Setting </span></strong><span><strong>(default)</strong> – The kernel ignores the status of Client side Nodes and uses only the online/offline status of relevant data objects to decide on the type of response.</span></li>
<li><! [if !supportLists] ><span><strong>Any_Offline</strong> </span><span>– If any relevant Client Node is offline the Server Node will respond with a node offline message as defined by the Server protocol. This option is available for selected drivers only.</span></li>
<li><! [if !supportLists] ><span><strong>All_Offline</strong> </span><span>– If <span>all<em> </em></span>relevant Client Nodes are offline the Server Node will respond with a node offline message as defined by the Server protocol<span>. </span>This option is available for selected drivers only.</span></li>
<li><! [if !supportLists] ><span><strong>Always_Respond</strong> </span><span>– A response with data currently in the FieldServer is <span>always </span>sent, without considering the online/offline status of the relevant Client Nodes. This option is available for all drivers.</span></li>
</ol>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;" mce_style="margin-bottom: 0.0001pt; line-height: normal;"><span> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;" mce_style="margin-bottom: 0.0001pt; line-height: normal;"><span>Offline Server Nodes are treated differently by different protocols. Some protocols will have an explicit offline response, while others will simply not respond.</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;" mce_style="margin-bottom: 0.0001pt; line-height: normal;"><span> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;" mce_style="margin-bottom: 0.0001pt; line-height: normal;"><span>If configured, the node offline response will take priority over the data offline response.</span><--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/node-offline-responses/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tags v/s Categories</title>
		<link>http://www.chipkin.com/articles/tags-vs-categories</link>
		<comments>http://www.chipkin.com/articles/tags-vs-categories#comments</comments>
		<pubDate>Mon, 01 Jun 2009 12:36:37 +0000</pubDate>
		<dc:creator>skapoor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Article]]></category>
		<category><![CDATA[Categories]]></category>
		<category><![CDATA[Page]]></category>
		<category><![CDATA[Search Engine Optimization]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Tags]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=374</guid>
		<description><![CDATA[Earlier, WordPress.com used only categories and no tags. A tag is a new breed of search engine optimization i.e. SEO. Tags are fundamentally keywords for each page or article created by us. It is a non-hierarchical keyword or term assigned to a piece of information such as an internet bookmark, digital image, or computer file. [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%;">Earlier, <strong>WordPress.com</strong> used only categories and no tags. A tag is a new breed of <strong>search engine optimization </strong>i.e.<strong> SEO</strong>. Tags are fundamentally keywords for each page or article created by us. It is a non-hierarchical keyword or term assigned to a piece of information such as an internet bookmark, digital image, or computer file. This type of metadata helps depict an item and facilitates it to be found again by browsing or searching. Tags are chosen easily and personally by the item&#8217;s creator or by its viewer, depending on the system. <strong>Tags</strong> are “free-form” words means there is no formal restriction on tags we attach.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%;">Long tag lists should be generally avoided. Tag pages are somewhat like category pages.  We can assign related posts the same tag, and then all those posts appear on the same tag page. During the design stages of the site, make a list on a piece of paper of all the tags we want to use on our site.  These will be the most important keywords for the niche, but they should be keywords that are different to the categories which we have setup for the site.  Tags can be considered as additional pages that WordPress will create offering us a secondary way of filing our posts. </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%;">Although, usage of tags made broad grouping of post topics possible yet to describe a post in more specific terms, more categories are needed. A <strong>category</strong> is an<span> exclusively defined division in a system of classification.</span> A system of classification here refers to a highly structured, possibly hierarchical system. For example, to borrow from the classification system for living things, we have a tree like “Animals -&gt; Vertebrates -&gt; Mammals -&gt; Horses”. Any of these terms can be considered to be a category, and they fall into a strict structure.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%;">The basic difference between categories and tags is that categories are structured and tags are unstructured. Categories organize, hierarchically. Tags need not. Tags provide meta-information, Categories need not. Tags cross-connect, Categories do not. </span>&lt;&#8211;&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/tags-vs-categories/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Page Rank</title>
		<link>http://www.chipkin.com/articles/google-page-rank</link>
		<comments>http://www.chipkin.com/articles/google-page-rank#comments</comments>
		<pubDate>Mon, 25 May 2009 05:24:37 +0000</pubDate>
		<dc:creator>skapoor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[link analysis]]></category>
		<category><![CDATA[Pagerank]]></category>
		<category><![CDATA[probability distribution]]></category>
		<category><![CDATA[World Wide Web]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=352</guid>
		<description><![CDATA[PageRank is a link analysis algorithm used by the Google Internet search engine that assigns a numerical weighting to each element of a hyperlinked set of documents, such as the World Wide Web. The purpose behind this is to measure the relative importance of the element within the set. It is a probability distribution check [...]]]></description>
			<content:encoded><![CDATA[<p><!--[endif]--></p>
<p class="MsoNormal"><strong>P<span>ageRank</span></strong> is a link analysis algorithm used by the Google Internet search engine that assigns a numerical weighting to each element of a hyperlinked set of documents, such as the World Wide Web. The purpose behind this is to measure the relative importance of the element within the set. It is a probability distribution check which represents the possibility that a person randomly clicking on links will arrive at any particular page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/google-page-rank/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get to know your Power Meter &#8211; What is Real, Apparent and Reactive Power</title>
		<link>http://www.chipkin.com/articles/get-to-know-your-power-meter-what-is-real-apparent-and-reactive-power</link>
		<comments>http://www.chipkin.com/articles/get-to-know-your-power-meter-what-is-real-apparent-and-reactive-power#comments</comments>
		<pubDate>Tue, 28 Apr 2009 00:12:11 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apparent]]></category>
		<category><![CDATA[current]]></category>
		<category><![CDATA[dip]]></category>
		<category><![CDATA[EFT]]></category>
		<category><![CDATA[filters]]></category>
		<category><![CDATA[frequency]]></category>
		<category><![CDATA[hz]]></category>
		<category><![CDATA[khz]]></category>
		<category><![CDATA[meter]]></category>
		<category><![CDATA[over]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[reactive]]></category>
		<category><![CDATA[real]]></category>
		<category><![CDATA[sag]]></category>
		<category><![CDATA[standard]]></category>
		<category><![CDATA[surge]]></category>
		<category><![CDATA[swell]]></category>
		<category><![CDATA[transient]]></category>
		<category><![CDATA[transients]]></category>
		<category><![CDATA[under]]></category>
		<category><![CDATA[voltage]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=329</guid>
		<description><![CDATA[First &#8211; a simple question   Right or Wrong? Power = Voltage x Current That statement is correct for DC systems but there are two major complications for AC systems. The value of current and voltage keeps changing. Which value do you use ? The voltage and the current may not be in phase. Multiplying [...]]]></description>
			<content:encoded><![CDATA[<p><strong>First &#8211; a simple question </strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;">Right or Wrong? Power = Voltage x Current</span></p>
<p><span style="color: #003366;">That statement is correct for DC systems but there are two major complications for AC systems.</span></p>
<ul>
<li>The value of current and voltage keeps changing. Which value do you use ?</li>
<li>The voltage and the current may not be in phase. Multiplying the current and the voltage when they are not in phase requires and adjustment to compensate for the phase. It is this phase shift that forces us to define Real, Apparent and Reactive Power.<br />
This phase shift occurs when a power source feeds an inductive or capacitve load&#8221;. Most loads are either inductive (motors) or resistive (heaters) and therefore the phase shift is typically in one direction.</p>
<ul>
<li>A motor has a winding. A wound conductor essentially defines an inductor. Thus the winding presents the resistance of the wound wire and the inductance resulting from the winding.</li>
</ul>
</li>
</ul>
<p> </p>
<p> </p>
<p> </td>
</tr>
</tbody>
</table>
<p><strong>RMS or Effective Value</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;">Peak values in the alternating voltage or current curves only lasts a short instant. They are not really representative of the ability of the voltage and current to do work and thus they are not used in Power Calculations.Scientists use a statistical method to define the effective values. It is called the RMS or Root-Mean-Square values. The result of the definition is that:Veff / rms = 0.707 x Vpeak</p>
<p>The same applies to current too.</p>
<p>TIP: You can reasonably assume that all the Voltages and Currents reported by a Power Meter are reported as RMS or Effective values unless otherwise indicated.</p>
<p>TIP: Most multi meters report RMS values</p>
<p> </p>
<p> </p>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
<p><strong>Apparent Power</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;">Apparent Power is the power delivered by a power source to a load like a motor. In almost all real world situations that use AC, you need to supply more power (Apparent Power) to a device than it will do work (Real Power).The (vector) difference between the two represents the work done to overcome the inductive and capacitive effects of the load.Apparent Power is measured in units of VA – Volt-amperes. These are actually Watts but we use the new unit name to reduce confusion. Thus when you see VA on a data sheet you can reasonably conclude that they are talking about Apparent Power.</p>
<p>Apparent Power is calculated:</p>
<p>S(Common symbol for Apparent Power) = Veff / rms x Ieff / rms &#8211; Single Phase Calc</p>
<p> </p>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
<p><strong>Power Factor and Phase</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;">Power Factor is calculated: PF = Cosine ( phase angle in radians)Power factor has no engineering units.The value of PF ranges from -1 to 0 to 1 (lagging – none – leading)</p>
<p>Loads that only present a resistive load (no capacitance or inductance) have a PF of 1.</p>
<p><em>Inductive Loads</em></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;"><br />
Current phase lags the VoltageTypical &#8211; Transformers and motors (wound conductors) </p>
<p></span></td>
</tr>
</tbody>
</table>
<p><em>Capacitive Loads</em></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;"><br />
Current phase leads the VoltageTypical &#8211; Buried Cables, capacitor banksThere is nothing ‘wrong’ with having a power factor that isn’t 1.0.</p>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
<p><strong>Real Power and Reactive Power</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;">Think of Real Power as useful power – a measure of how much work is being done.The units of Real Power are Watts.Real Power is calculated : P(Real) = S(Apparent Power) x pf</p>
<p>Reactive Power is the (vector) difference between Apparent Power and Real Power. The energy used to produce the Reactive Power is stored in the magnetic/electrical field of the Inductive Load. In the case of the capacitive load the magnetic/electrical field of the Inductive Load produces the Reactive Power. Reactive Power cannot be harnessed to do useful work.</p>
<p>Reactive Power is identified by the symbol : Q</p>
<p>The engineering units of Reactive Power are VAR – Volt-amperes Reactive. These are also Watts but we use VAR so that we know we are talking about Reactive Power.</p>
<p> </p>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
<p><strong>Diagram: RMS measurement</strong></p>
<p style="text-align: center;"><img class="size-medium wp-image-332  aligncenter" title="diag11" src="http://www.chipkin.com/articles/wp-content/uploads/2009/04/diag11-300x193.jpg" alt="diag11" width="300" height="193" /></p>
<p><strong>Diagram: Leading / Lagging</strong></p>
<p style="text-align: center;"><img class="size-medium wp-image-333  aligncenter" title="diag21" src="http://www.chipkin.com/articles/wp-content/uploads/2009/04/diag21-300x193.jpg" alt="diag21" width="300" height="193" /></p>
<p><strong>THD – Total harmonic Distortion (also called Distortion)</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;">In simple terms THD is a measure of distortion reported as %. If a device (any active device but think of rectifiers, variable speed drives … as practical examples) is given a sine wave as in input the output is never a faithful 100% reproduction of the input. A series of harmonics of the original wave distort the original wave form. The THD % is an attempt to ‘numberize’ the degree of distortion to allow for comparison. The % number is somewhat controversial because some harmonics are more important than others and there is no weighting.THD(%) = 100 * SQRT[(V22 + V32 + V42 + ... + Vn2)] / VtWhere V2, V3 are the RMS values of each voltage harmonic and Vt is the total RMS output voltage.</p>
<p> </p>
<p> </p>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
<p><strong>Sag / Swell or Dip / Surge</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;">Duration is 0.5 cycle and greater. Voltage sags are the most common power disturbance. Voltage sags can arrive from the utility. In most cases, sags are generated inside a building. For example, in residential wiring, the most common cause of voltage sags is the starting current drawn by refrigerator and air conditioning motors.Sags do not generally disturb incandescent or fluorescent lighting. motors, or heaters. However, some electronic equipment lacks sufficient internal energy storage and, therefore, cannot ride through sags in the supply voltage. Equipment may be able to ride through very brief, deep sags, or it may be able to ride through longer but shallower sags. </p>
<p> </p>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
<p><strong>Under / Over Voltage</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;">Over Voltage is an increase in effective voltage to more than 110% for longer than one minute. Under Voltage is a decrease in effective voltage to less than 90% for longer than one minute. Take care with this definition because it tends to change from vendor to vendor.  </p>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
<p><strong>Transient Voltages / Spikes / Surges</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;">Refers to short duration (less than 1 cycle) events. Low frequency transients are often called &#8220;capacitor switching transients&#8221;. High frequency transients are often called impulses, spikes, or surges. They can be caused when a discharged power-factor-correction capacitor is switched on across the line.High frequency transients are caused by lightning, and by inductive loads turning off. Typical rise times are on the order of a microsecond; typical decay times are on the order of a tens to hundreds of microseconds. Often, the decay will be an exponential damped ringing waveform, with a frequency of approximately 100 kHz.Extremely fast transients, or EFT&#8217;s, have rise and fall times in the nanosecond region. They are caused by arcing faults, such as bad brushes in motors, and are rapidly damped out by even a few meters of distribution wiring. Standard line filters, included on almost all electronic equipment, remove EFT&#8217;s.</p>
<p> </p>
<p> </p>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/get-to-know-your-power-meter-what-is-real-apparent-and-reactive-power/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Hubs vs Switches &#8211; Using WireShark to sniff network packets</title>
		<link>http://www.chipkin.com/articles/hubs-vs-switches-using-wireshark-to-sniff-network-packets</link>
		<comments>http://www.chipkin.com/articles/hubs-vs-switches-using-wireshark-to-sniff-network-packets#comments</comments>
		<pubDate>Tue, 28 Apr 2009 00:01:14 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[10]]></category>
		<category><![CDATA[100]]></category>
		<category><![CDATA[D-link]]></category>
		<category><![CDATA[de-805tp]]></category>
		<category><![CDATA[DS104]]></category>
		<category><![CDATA[dual]]></category>
		<category><![CDATA[DX-EHB4]]></category>
		<category><![CDATA[hub]]></category>
		<category><![CDATA[hubs]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[mbit]]></category>
		<category><![CDATA[mbits/sec]]></category>
		<category><![CDATA[mode]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[packets]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[sniff]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[switches]]></category>
		<category><![CDATA[traffic]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=325</guid>
		<description><![CDATA[Gotcha #1 : Use a hub not a switch   Why: Switches don’t copy all messages to all ports. They try and optimize traffic so when they learn which port a device is connected to they send all messages intended for that device to that port and stop copying to all ports. (The jargon they [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Gotcha #1 : Use a hub not a switch</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;"><br />
<strong>Why:</strong> Switches don’t copy all messages to all ports. They try and optimize traffic so when they learn which port a device is connected to they send all messages intended for that device to that port and stop copying to all ports. (The jargon they use for this function is ‘learning mode’)</span></p>
<p><span style="color: #003366;"><strong>How do you know it’s a hub:</strong> Just because it calls itself a hub doesn’t mean it is one.</p>
<ul>
<li>If it says full-duplex in the product description it’s probably not a hub.</li>
<li>A switch that allows you to turn off the learning mode is effectively a hub.  </li>
<li>A switch with a monitored port copies all messages to the monitored port and thus you can use that port as if it were a hub. </li>
<li>If it says ‘switch’ and you cant turn off learning mode and it doesn’t have a monitor port then it is not a hub. </li>
<li>A router is never a hub.</li>
</ul>
<p> </p>
<p></span></td>
</tr>
</tbody>
</table>
<p><strong>Gotcha #2 : Mixing 10 and 100 mbits/sec can cause problems.</strong></p>
<table border="0">
<tbody>
<tr>
<td width="50"> </td>
<td><span style="color: #003366;"><br />
Not all hubs copy 10mbit messages to 100mbit ports and vice versa.Use a 10mbit/sec hub if you are on a mixed network – almost all other faster devices are speed sensing and will downgrade themselves to 10mbits/sec and thus you will see all the packets. This is not true of some building automation engines where the speed of the port is configured.</p>
<p>You can work around this problem by connecting higher speed devices to a self sending switch/hub and then connect that switch/hub to the 10mbit hub.</p>
<p></span></td>
</tr>
</tbody>
</table>
<p><strong>Recommended Hubs</strong></p>
<ul>
<li>10Mbit/sec Networks &#8211; DX-EHB4 &#8211; 4 Port 10 Mbps HUB</li>
<li>Netgear &#8211; DS104 Dual Speed HUB</li>
<li>10Mbit/sec Networks – D-LINK DE-805TP</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/hubs-vs-switches-using-wireshark-to-sniff-network-packets/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The dangers of XML for System Intergators</title>
		<link>http://www.chipkin.com/articles/the-dangers-of-xml-for-system-intergators</link>
		<comments>http://www.chipkin.com/articles/the-dangers-of-xml-for-system-intergators#comments</comments>
		<pubDate>Mon, 27 Apr 2009 22:33:10 +0000</pubDate>
		<dc:creator>cpascu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[danger]]></category>
		<category><![CDATA[dangers]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[integrators]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[transfer]]></category>
		<category><![CDATA[UDP]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.chipkin.com/articles/?p=279</guid>
		<description><![CDATA[Just because a system has an XML interface does not mean you can use it. There are some very important questions you must ask in evaluating the usefulness of an XML interface. XML provides a syntax and structure but imposes no obligation on how it must be used. Consider the example of spoken language. English [...]]]></description>
			<content:encoded><![CDATA[<p>Just because a system has an XML interface does not mean you can use it. There are some very important questions you must ask in evaluating the usefulness of an XML interface.<br />
XML provides a syntax and structure but imposes no obligation on how it must be used.</p>
<p>Consider the example of spoken language. English imposes rules on syntax and structure but does not oblige you to say anything useful or comprehensible to other people.</p>
<table border="0" align="center">
<tbody>
<tr>
<td style="width: 500px; text-align: left; border: black 1px solid; padding: 5px;"><strong>Data Transfer using English</strong></p>
<ul>
<li>&#8220;Give me the data!” is a valid instruction in English</li>
<li>“Please email me the 2007 sales figures, grouped by territory with a monthly breakdown in tabular format” is also a valid instruction.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Your assistant is likely to respond well to the 2nd instruction and not know how to respond to the first.</p>
<p> </p>
<p>The same considerations apply to XML. Now consider an XML example:</p>
<table border="0" align="center">
<tbody>
<tr>
<td style="width: 500px; text-align: left; border: black 1px solid; padding: 5px;"><strong>Data Transfer using XML</strong></p>
<p><strong>Format example 1</strong></p>
<pre>	&lt; Data Xfer &gt;
		&lt; Send data now ! &gt;
	&lt; /Data Xfer &gt;</pre>
<p><strong>Format example 2</strong></p>
<pre>	&lt; poll &gt;
		&lt; source &gt;
			&lt; nodeId &gt; 22 &lt; /nodeId &gt;
		&lt; dest &gt;
			&lt; nodeId &gt; 11 &lt; /nodeId &gt;
			&lt; nodeName &gt; node_A &lt; /nodeName &gt;
		&lt; /dest &gt;
		&lt; responseRequirement &gt; dataOnly &lt; /responseRequirement &gt;
		&lt; query &gt;
			&lt; action &gt; read &lt; /action &gt;
			&lt; tableName &gt; Setpoints &lt; /tableName &gt;
			&lt; address &gt; 10 &lt; /address &gt;
			&lt; length &gt; 3 &lt; /length &gt;
		&lt; /query &gt;
	&lt; /poll &gt;</pre>
</td>
</tr>
</tbody>
</table>
<p> </p>
<p>Its not hard to see that the success of the query is dependent on the ability of the system to understand the query. Just because it complies with the rules of the XML syntax does not mean the interface will understand it.</p>
<p><strong>Here are some key questions to ask:</strong></p>
<p>1. Is the XML interface implemented using TCP/IP or UDP?</p>
<p>2. What is the XML Schema? The schema provides the structure of the XML packets used to query and respond with system data. It shows how the messages must be formatted and defines the data types of the various message fields (in the world or protocols the schema is equivalent to the protocol specification).</p>
<p>3. All the other normal questions you would ask of an interface – What data is available? How much can be transferred at once? What is the scaling? How are data objects addressed? etc&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chipkin.com/articles/the-dangers-of-xml-for-system-intergators/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

