Path: news.mathworks.com!not-for-mail
From: Mark Jones <mark.jones@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Reading Serial data from RS232 Continuously
Date: Thu, 27 Mar 2008 09:01:22 -0400
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <fsg5r2$qpa$1@fred.mathworks.com>
References: <fsdvm1$q8l$1@fred.mathworks.com> <fsg4bh$dkn$1@fred.mathworks.com>
NNTP-Posting-Host: jonesm.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1206622882 27434 172.31.57.104 (27 Mar 2008 13:01:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 27 Mar 2008 13:01:22 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
In-Reply-To: <fsg4bh$dkn$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:459462



> "SmartEngineer " <smartengineer@mathworks.com> wrote in 
> message <fsdvm1$q8l$1@fred.mathworks.com>...
>> Hello,
>>      Can anyone please suggest me  how to acquire the 
> data
>> (ASCI format) from a RS 232 port continuously..i.e The 
>> port will be opened and it should keep reading till I 
> say 
>> stop(may be using a GUI).
>>  
>> Thanks in advance for your help.
>>
>> SME.
> 

You can do this using a BytesAvailableFcn callback.  Please see:

http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/bytesavailablefcn.html

Mark