SerialIO mex
by Lorgio Teodovich
03 Oct 2009
(Updated 14 Nov 2009)
SerialIO is written in C and allows you to read/write to a serial or com port.
|
Watch this File
|
| File Information |
| Description |
Although MATLAB is supposed to support both writing and reading data from the serial port, reading data seems to either produce no result, generate an error, or crash MATLAB. To remedy the situation SerialIO() has been written. This function will allow you to set/get vectors of data from the serial port buffer.
To help, type "SerialIO('help');
s = SerialIO('open','com2',19200);
SerialIO('write',x,3);
y=SerialIO('read',6);
SerialIO('close');
Note: to compile "mex SerialIO.cpp" |
| MATLAB release |
MATLAB 6.5 (R13)
|
| Other requirements |
Lcc compiler.
If I set Visual Studio 2005-8 --> Project Properties --> Project Defaults --> Character set to:
"Use Multi-Byte Character set" |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 10 Oct 2009 |
Change #include <process.h>. |
| 31 Oct 2009 |
C |
| 14 Nov 2009 |
Add visul 2005-8 compatibility. |
|
Contact us at files@mathworks.com