Thread Subject: Reading Serial data from RS232 Continuously

Subject: Reading Serial data from RS232 Continuously

From: SmartEngineer

Date: 26 Mar, 2008 17:04:01

Message: 1 of 5

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.

Subject: Reading Serial data from RS232 Continuously

From: SmartEngineer

Date: 27 Mar, 2008 12:36:01

Message: 2 of 5


Any help please.




"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.

Subject: Reading Serial data from RS232 Continuously

From: Mark Jones

Date: 27 Mar, 2008 13:01:22

Message: 3 of 5

> "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

Subject: Reading Serial data from RS232 Continuously

From: SmartEngineer

Date: 29 Mar, 2008 06:51:01

Message: 4 of 5

Thanks Mark

Subject: Reading Serial data from RS232 Continuously

From: Jeremy

Date: 11 Apr, 2008 03:48:01

Message: 5 of 5

I was trying to do a similar operation but I wanted to read
the binary values in and convert them to integers and then
manipulate as necessary. I am using the rs232 to transmit in
2 bytes at a time. I want to read them in continuously. But
I am really lost as to where to start on this. Any help?

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
continuous read Jeremy 10 Apr, 2008 23:50:07
serial Jeremy 10 Apr, 2008 23:50:07
port Jeremy 10 Apr, 2008 23:50:07
serial read SmartEngineer 26 Mar, 2008 13:05:07
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com