<?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>VI Geek &#187; Misc</title>
	<atom:link href="http://www.vigeek.com/category/others-that-related-with-virtual-instruments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vigeek.com</link>
	<description>My Way to Be A Virtual Instruments Geek</description>
	<lastBuildDate>Thu, 01 Jul 2010 06:36:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Decode Serial Port File Transfer Protocols from Scratch with LabVIEW and Serial Monitor</title>
		<link>http://www.vigeek.com/2008/04/decode-serial-port-file-transfer-protocols-from-scratch-with-labview-and-serial-monitor.html</link>
		<comments>http://www.vigeek.com/2008/04/decode-serial-port-file-transfer-protocols-from-scratch-with-labview-and-serial-monitor.html#comments</comments>
		<pubDate>Fri, 18 Apr 2008 04:30:10 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LabVIEW]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Serial & GPIB]]></category>
		<category><![CDATA[VI Hardware]]></category>
		<category><![CDATA[VI Software]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[decode]]></category>
		<category><![CDATA[DNC]]></category>
		<category><![CDATA[file transfer]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[Serial Monitor]]></category>

		<guid isPermaLink="false">http://www.vigeek.com/?p=21</guid>
		<description><![CDATA[Sometimes we need to write our own software to transfer files to serial port connected device, like DNC, which provides manuals and working software but no source code or the author of the software does not exist or does not support the software anymore. So, it&#8217;s a must to decode the serial transfer protocol to [...]


Related posts:<ol><li><a href='http://www.vigeek.com/2010/01/how-to-run-a-msi-file-in-a-labview-application-installation.html' rel='bookmark' title='Permanent Link: How to Run a .msi file in a LabVIEW Application Installation'>How to Run a .msi file in a LabVIEW Application Installation</a> <small>There is no support of the running of .msi files...</small></li>
<li><a href='http://www.vigeek.com/2010/01/how-to-add-version-control-in-labview.html' rel='bookmark' title='Permanent Link: How to Add Version Control in LabVIEW'>How to Add Version Control in LabVIEW</a> <small>LabVIEW does not have built-in version control, but we can...</small></li>
<li><a href='http://www.vigeek.com/2010/01/the-difference-between-chart-and-graph-in-labview.html' rel='bookmark' title='Permanent Link: The Difference Between Chart and Graph in LabVIEW'>The Difference Between Chart and Graph in LabVIEW</a> <small>We can use chart and graph to display our acquired...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes we need to write our own software to transfer files to serial port connected device, like DNC, which provides manuals and working software but no source code or the author of the software does not exist or does not support the software anymore. So, it&#8217;s a must to decode the serial transfer protocol to build our own software which is based on this protocol.</p>
<p>Here, I&#8217;ll show how to decode the serial transfer protocol from scratch with the help of LabVIEW and Serial Monitor step by step.</p>
<p>Step 1, we need to install a serial monitor software. Here we use <a href="http://www.shareit.com/product.html?cart=1&#038;productid=300168058&#038;cookies=1&#038;affiliateid=200075131" target="_blank">HHD Software Serial Monitor</a>. This software provides a monitoring device driver, which lies upon the serial device driver of the Windows NT, Windows 2000 and Windows XP operating systems. It collects all information including data read and written, control codes received and sent to the underlying hardware by the user mode client.  After the installation of the serial monitor software, we first run this monitor software and start a monitoring session and set it up to log all the activity of the serial port like the figure below.<span id="more-21"></span><a href="http://www.vigeek.com/wp-content/uploads/2008/04/configsm.png"> <img src="http://www.vigeek.com/wp-content/uploads/2008/04/configsm.png" alt="Serial Monitor Config" width="509" height="385" /> </a></p>
<p>In the menu, select <strong>File&#8211;New Session</strong>, a dialog box displayed as in the figure step 1. Select &#8220;next&#8221;, at step 2 select <strong>Serial Port Monitor</strong>; at step 3, select the serial port to be monitored; at step 4 select &#8220;<strong>Logging&#8230;</strong>&#8220;; at step 5, a pop-up dialog box displayed, then config the log file.</p>
<p>Step 2, we start the serial monitoring session in the <a href="http://www.shareit.com/product.html?cart=1&#038;productid=300168058&#038;cookies=1&#038;affiliateid=200075131" target="_blank">HHD Software Serial Monitor</a>. After that, run the working software provided by the serial device, transfer one file to the device, and fetch one file from the device. Then exit the working software and stop the log operation of the serial monitor software, and copy the files which are transfered from and to the serial device to local disk for later decode operation.</p>
<p>Step 3, start a Log File Display session in <a href="http://www.shareit.com/product.html?cart=1&#038;productid=300168058&#038;cookies=1&#038;affiliateid=200075131" target="_blank">HHD Software Serial Monitor</a>, load the log file generated in step 2. And the serial port activity history will displayed like the figure below.  <img src="http://www.vigeek.com/wp-content/uploads/2008/04/replay.png" alt="" /></p>
<dl>
<dt>In this table: Ordinal, the column contains the ordinal number of the request. The ordinal increases from up to down. Function, the column contains the name of the request. It can be one of standard IRP major function names. Direction, the column contains either <strong>UP</strong> or <strong>DOWN</strong> message, showing the direction of the request. If <strong>DOWN</strong> displayed, the request was initiated by the application, otherwise by the device driver. Data Present, the column displays the flag indicating whether the request comes with data or not. Status, the column displays the status of the request. Data, if the <strong>Data Present</strong> column displays <strong>TRUE</strong>, the first 100 bytes of data are displayed in this column in hexadecimal numbers. Data (Characters) , if the <strong>Data Present</strong> column displays <strong>TRUE</strong>, the first 100 bytes of data are displayed in this column in characters.</dt>
</dl>
<p>Step 4, use LabVIEW to get the information of the files transfered. Open LabVIEW, create a VI to get information of the files includes file size in bytes, the content of the file in text format displayed in hex.</p>
<p>Step 5, compare the file information with the log file display in <a href="http://www.shareit.com/product.html?cart=1&#038;productid=300168058&#038;cookies=1&#038;affiliateid=200075131" target="_blank">HHD Software Serial Monitor</a>. First, locate the number of file size in the log file. Then compare the file content with the logging file, locate where the file start transfer and where stop transfer. Usually, there should be one part to store the file name, one part to store file size, one part to store file content, one part to store hex numbers which indicate starting transfer and one part to store hex numbers which indicate stop transfer. Find all these part out and we get the protocol of the serial transfer of this device.</p>
<p>Step 6, use LabVIEW create a serial port transfer software using the protocol found in step 5 to verify if it works.</p>
<p class="zoundry_raven_tags"><!-- Tag links generated by Zoundry Raven. Do not manually edit. http://www.zoundryraven.com --></p>


<p>Related posts:<ol><li><a href='http://www.vigeek.com/2010/01/how-to-run-a-msi-file-in-a-labview-application-installation.html' rel='bookmark' title='Permanent Link: How to Run a .msi file in a LabVIEW Application Installation'>How to Run a .msi file in a LabVIEW Application Installation</a> <small>There is no support of the running of .msi files...</small></li>
<li><a href='http://www.vigeek.com/2010/01/how-to-add-version-control-in-labview.html' rel='bookmark' title='Permanent Link: How to Add Version Control in LabVIEW'>How to Add Version Control in LabVIEW</a> <small>LabVIEW does not have built-in version control, but we can...</small></li>
<li><a href='http://www.vigeek.com/2010/01/the-difference-between-chart-and-graph-in-labview.html' rel='bookmark' title='Permanent Link: The Difference Between Chart and Graph in LabVIEW'>The Difference Between Chart and Graph in LabVIEW</a> <small>We can use chart and graph to display our acquired...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vigeek.com/2008/04/decode-serial-port-file-transfer-protocols-from-scratch-with-labview-and-serial-monitor.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VI Geek &#8211; My New Tech Blog Start Now</title>
		<link>http://www.vigeek.com/2008/03/hello-world.html</link>
		<comments>http://www.vigeek.com/2008/03/hello-world.html#comments</comments>
		<pubDate>Mon, 17 Mar 2008 07:07:34 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.vigeek.com/?p=1</guid>
		<description><![CDATA[I have been in the industry of Virtual Instruments for over 10 years, and dedicated in the development of Virtual Instruments systems for over 7 years. The first time I touched the concept of PC based test system is at the year of 1998. At that year, I established a PC based optical fiber light [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I have been in the industry of Virtual Instruments for over 10 years, and dedicated in the development of Virtual Instruments systems for over 7 years. The first time I touched the concept of PC based test system is at the year of 1998. At that year, I established a PC based optical fiber light power dynamic acquisition system,  which use a notebook with a PCMCIA DAQ card to acquire the light power when the optical fiber is in a dynamic  movement status. The PCMCIA DAQ card was from IOTech, which is now a part of the NI. At that time, the  concept of Virtual Instruments was not very popular.</p>
<p>Since then, I was very interested in this area. And, luckily at the year of 2001, I began to work for one NI Alliance company as a software engineer, and after that company, I worked for another NI Alliance &amp; Reseller.  At the beginning, I used the LabWindows/CVI version 5.5 to build custom VI systems (PC based test and control systems) for customers, and later I began to use LabVIEW  to build custom VI systems for customers.</p>
<p>Today I establish this blog site to share my experience and knowledge with everyone who is also interested. Hope I can learn a lot more here.</p>
<p>Good luck!</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.vigeek.com/2008/03/hello-world.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
