From: Steve on
Hi,

I know many programs which are monitoring the serial port of a pc (SerialWatcher, PortWatcher, ...). Is this also possible with matlab? I don't want to get a own connection to send/read data, I just want to see what other programs do while they are connected to the serial port.

Would be of great help,
thanks!
From: Bruce on
"Steve " <stefan.griesser(a)alumni.unileoben.ac.at> wrote in message <hvsgu7$nok$1(a)fred.mathworks.com>...
> Hi,
>
> I know many programs which are monitoring the serial port of a pc (SerialWatcher, PortWatcher, ...). Is this also possible with matlab? I don't want to get a own connection to send/read data, I just want to see what other programs do while they are connected to the serial port.
>
> Would be of great help,
> thanks!

Hello Steve,

I found this excellent technical support solution on MathWorks website:
" Is it possible to read from or write to a serial port with MATLAB?"
http://www.mathworks.com/support/solutions/en/data/1-1884B/index.html?product=ML&solution=1-1884B

From the link above:
Here is an example serial session connecting MATLAB to the serial port (COM1) with a baud rate of 4800:
s = serial('COM1');
set(s,'BaudRate',4800);
fopen(s);
fprintf(s,'*IDN?')
out = fscanf(s);
fclose(s)
delete(s)
clear s
-------------------------
Other links:
Using Control Pins:
http://www.mathworks.nl/access/helpdesk/help/techdoc/matlab_external/f85300.html

Serial Port I/O - heaps of stuff (where I got the first link from):
http://www.mathworks.com/support/product/solutions.html?show=yes&page=1&product=ML&type=Solution&category=1-15ETT&topic=Using%20External%20Hardware&productcategory=&subcategory=1-15ETT&parentcategory=1-28WSTH

Regards

Bruce