<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://schweda.net/blog_rss.php?bid=379" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Ansprechen der seriellen Schnittstelle unter Dynamics AX 2009]]></title>
<description><![CDATA[
<p>Mithilfe der Klasse <a href="http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx" target="_blank" title="MSDN SerialPorts">SerialPorts</a> aus&nbsp;dem .net-Framework kann man unter Dynamics AX 2009 recht bequem auf die serielle Schnittstelle zugreifen. Nachstehend dazu ein kurzes Code-Beispiel, wie man ein Display, wie man es z.B. von Kassensystemen kennt, ansteuern kann.
</p>

<div class="div_blog_axcode"><span style="color: rgb(0, 0, 255);">static void</span> sendText2SerialPort(Args _args)<br />
{<br />
&nbsp;&nbsp;&nbsp; System.IO.Ports.SerialPort&nbsp;SerialPort;<br />
&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 255);">str</span>&nbsp;deleteDisplay = <span style="color: rgb(0, 0, 255);">num2char</span>(hex2int(<span style="color: rgb(255, 0, 0);">&quot;0C&quot;</span>));<br />
&nbsp;&nbsp;&nbsp; ;<br />
&nbsp;&nbsp;&nbsp; SerialPort = new System.IO.Ports.SerialPort(<span style="color: rgb(255, 0, 0);">'com4'</span>);<br />
&nbsp;&nbsp;&nbsp; SerialPort.Open(); <br />
&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 255);">if</span>(SerialPort.get_IsOpen())<br />
&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SerialPort.Write(deleteDisplay); <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SerialPort.Write(<span style="color: rgb(255, 0, 0);">'Welcome World!'</span>); <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SerialPort.Close();<br />
&nbsp;&nbsp;&nbsp; }<br />
}
</div>

<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Thu, 24 Jun 2010 19:47:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=379</link>
<comments>https://www.schweda.net/blog_ax.php?bid=379</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=379</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=379</wfw:commentRss>
</item>
</channel>
</rss>	
