Thread Subject: Streaming data over serial

Subject: Streaming data over serial

From: Sachitha Obeysekara

Date: 2 Aug, 2007 07:37:41

Message: 1 of 2

Hi,
Does anyone know how to stream data over serial? I have a lot of data coming through a sensor and setting the buffer size and timeout really high is no good. Ideally I want to be able to say fprintf(sensor, 'Send Data') and then just save it all to an array as it comes in.

Cheers

Subject: Streaming data over serial

From: Adrian Hood

Date: 2 Aug, 2007 22:14:57

Message: 2 of 2

How about just running a loop and continuously checking to
see if data is available, and if so, read the values. Here's
a jist of what I am referring to:

FLAGG=1;
data=[];
while FLAGG
   fprintf(EquipmentOBJ,'CheckAvailableBytes')
   check=fscanf(EquipmentOBJ);
   if check>0
      fprintf(EquipmentOBJ,'Getdata')
      data=[data fscanf(EquipmentOBJ)];
   end
end


"Sachitha Obeysekara" <sachitha.2.obeysekara@gsk.com> wrote
in message <f8s1k5$njf$1@fred.mathworks.com>...
> Hi,
> Does anyone know how to stream data over serial? I have a
lot of data coming through a sensor and setting the buffer
size and timeout really high is no good. Ideally I want to
be able to say fprintf(sensor, 'Send Data') and then just
save it all to an array as it comes in.
>
> Cheers

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
streaming Sachitha Obeysekara 2 Aug, 2007 03:40:24
comm Sachitha Obeysekara 2 Aug, 2007 03:40:23
serial Sachitha Obeysekara 2 Aug, 2007 03:40:23
rssFeed for this Thread

Public Submission Policy

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 Disclaimer prior to use.

Contact us at files@mathworks.com