 




<?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>IT Answers &#187; RS232</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/rs232/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Sat, 25 May 2013 15:43:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>VB6 and VB.NET Serial (COM1) data error</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/vb6-and-vbnet-serial-com1-data-error/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/vb6-and-vbnet-serial-com1-data-error/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 04:29:00 +0000</pubDate>
		<dc:creator>Aattanayake</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[COM1]]></category>
		<category><![CDATA[RS232]]></category>
		<category><![CDATA[Serial ports]]></category>
		<category><![CDATA[VB 6.0]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hello, I&#8217;m new to .NET. I have an application that is running in VB6. It sends text through COM1 port to another device. When I converted the VB6 code to .NET the string it sends out is different! I have tried so many things and don&#8217;t know what to do. I used a serial data [...]]]></description>
				<content:encoded><![CDATA[<p>Hello,<br />
I&#8217;m new to .NET. I have an application that is running in VB6. It sends text through COM1 port to another device.</p>
<p>When I converted the VB6 code to .NET the string it sends out is different! I have tried so many things and don&#8217;t know what to do. I used a serial data analyzer and found the two strings are different even the the source code is the same.</p>
<p>VB6 source code:<br />
MSComm1.CommPort = 1<br />
MSComm1.Settings = &#8220;9600,O,8,1&#8243;<br />
MSComm1.PortOpen = True<br />
MSComm1.Output = Chr(&#038;H2B) &#038; _<br />
Chr(&#038;H4) &#038; _<br />
Chr(&#038;H3) &#038; _<br />
Chr(&#038;HE8) &#038; _<br />
Chr(&#038;H0) &#038; _<br />
Chr(&#038;H2) &#038; _<br />
Chr(&#038;HF6) &#038; _<br />
Chr(&#038;H71)<br />
MSComm1.PortOpen = False</p>
<p>The analyzer gets the following string in hex: 2B 04 03 E8 00 02 F6 71</p>
<p>VB.NET source code:<br />
Dim Port As SerialPort = New SerialPort(&#8220;COM1&#8243;, 9600, Parity.Odd, 8, StopBits.One)<br />
Port.Open()<br />
Port.Write(System.Convert.ToChar(&#038;H2B) &#038; _<br />
System.Convert.ToChar(&#038;H4) &#038; _<br />
System.Convert.ToChar(&#038;H3) &#038; _<br />
System.Convert.ToChar(&#038;HE8) &#038; _<br />
System.Convert.ToChar(&#038;H0) &#038; _<br />
System.Convert.ToChar(&#038;H2) &#038; _<br />
System.Convert.ToChar(&#038;HF6) &#038; _<br />
System.Convert.ToChar(&#038;H71))<br />
Port.Close()</p>
<p>The analyzer gets the following string in hex: 2B 04 03 0F 00 02 3F 71</p>
<p>Why is there a difference in the string?<br />
Please help me correct it&#8230;<br />
Thanks</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/vb6-and-vbnet-serial-com1-data-error/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/14 queries in 0.023 seconds using memcached
Object Caching 320/338 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-25 21:25:28 -->