<?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; Serial &amp; GPIB</title>
	<atom:link href="http://www.vigeek.com/category/hardware-used-in-virtual-instruments/serial/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>How to Ignore CR LF ASCII Codes in Serial Receive with LabVIEW</title>
		<link>http://www.vigeek.com/2010/03/how-to-ignore-cr-lf-ascii-codes-in-serial-receive-with-labview.html</link>
		<comments>http://www.vigeek.com/2010/03/how-to-ignore-cr-lf-ascii-codes-in-serial-receive-with-labview.html#comments</comments>
		<pubDate>Mon, 08 Mar 2010 07:21:10 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LabVIEW]]></category>
		<category><![CDATA[Serial & GPIB]]></category>
		<category><![CDATA[VI Hardware]]></category>
		<category><![CDATA[VI Software]]></category>
		<category><![CDATA[ASCII]]></category>
		<category><![CDATA[Carriage Return]]></category>
		<category><![CDATA[Line Feed]]></category>
		<category><![CDATA[Serial Communication]]></category>

		<guid isPermaLink="false">http://www.vigeek.com/2010/03/how-to-ignore-cr-lf-ascii-codes-in-serial-receive-with-labview.html</guid>
		<description><![CDATA[In one of my recent LabVIEW projects, my application needs receive the message which send by an ECU unit, and to store the message exactly as it send. And the content of the message is hex data, every byte of this message has a specific meaning to this ECU unit, and I need these data [...]


Related posts:<ol><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>
<li><a href='http://www.vigeek.com/2009/09/a-better-way-to-access-variables-in-complex-programs-in-labview.html' rel='bookmark' title='Permanent Link: A Better Way to Access Variables in Complex Programs in LabVIEW'>A Better Way to Access Variables in Complex Programs in LabVIEW</a> <small>In some LabVIEW programs, we need to access the value...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In one of my recent LabVIEW projects, my application needs receive the message which send by an ECU unit, and to store the message exactly as it send. And the content of the message is hex data, every byte of this message has a specific meaning to this ECU unit, and I need these data to check if the ECU works as desired.</p>
<p>I programmed this application simply with the default VISA read VI. But when I debugged the application to receive the message send by the ECU, sometimes the message was not complete. When I check the send data with the received data, I found out that LabVIEW automatically breaks the message read when it receives 0x0A or 0&#215;25, and these two hex are carriage return and line feed respectively in ASCII.</p>
<p>To receive the message as desired, we need to disable the read function response to the 0x0A and 0&#215;25 in LabVIEW. Here is how to do it: place VISA Configure Serial Port VI in the diagram, there is an input which called &#8220;Enable Termination Character&#8221;, the default value of that input is TRUE, which causes the uncomplete data I talked above. To ignore CR LF ASCII codes, we just need set the input to FALSE, wiring a false constant to it.</p>


<p>Related posts:<ol><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>
<li><a href='http://www.vigeek.com/2009/09/a-better-way-to-access-variables-in-complex-programs-in-labview.html' rel='bookmark' title='Permanent Link: A Better Way to Access Variables in Complex Programs in LabVIEW'>A Better Way to Access Variables in Complex Programs in LabVIEW</a> <small>In some LabVIEW programs, we need to access the value...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vigeek.com/2010/03/how-to-ignore-cr-lf-ascii-codes-in-serial-receive-with-labview.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
	</channel>
</rss>
