<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264224</link>
    <title>MATLAB Central Newsreader - check serial ports via matlab</title>
    <description>Feed for thread: check serial ports via matlab</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 27 Oct 2009 13:06:19 -0400</pubDate>
      <title>check serial ports via matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264224#690024</link>
      <author>jacob lalaounis</author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
I would like to send data from a serial port to another serial port.&lt;br&gt;
I would like to check this by sending data and check what i get through matlab.&lt;br&gt;
How is this possible??&lt;br&gt;
&lt;br&gt;
Thank you in advance &lt;br&gt;
Jacob</description>
    </item>
    <item>
      <pubDate>Tue, 27 Oct 2009 14:34:12 -0400</pubDate>
      <title>Re: check serial ports via matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264224#690056</link>
      <author>Trent Jarvi</author>
      <description>&lt;br&gt;
&quot;jacob lalaounis&quot; &amp;lt;lalaounisjacob@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:hc6r8b$qie$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I would like to send data from a serial port to another serial port.&lt;br&gt;
&amp;gt; I would like to check this by sending data and check what i get through &lt;br&gt;
&amp;gt; matlab.&lt;br&gt;
&amp;gt; How is this possible??&lt;br&gt;
&lt;br&gt;
Hi Jacob,&lt;br&gt;
&lt;br&gt;
The basics are as follows:&lt;br&gt;
&lt;br&gt;
s=serial('com1','BaudRate', 9600 );&lt;br&gt;
inspect(s);&lt;br&gt;
fopen(s);&lt;br&gt;
if( s.BytesAvailable &amp;gt; 0 )&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data = fread( s, s.BytesAvailable );&lt;br&gt;
end&lt;br&gt;
fwrite(s,'Hello World!');&lt;br&gt;
fclose(s);&lt;br&gt;
delete(s);&lt;br&gt;
clear s;&lt;br&gt;
&lt;br&gt;
The following link provides documentation for using serial ports in MATLAB.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f38496.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f38496.html&lt;/a&gt; </description>
    </item>
  </channel>
</rss>

