SerialIO mex

SerialIO is written in C and allows you to read/write to a serial or com port.
1.9K Downloads
Updated 14 Nov 2009

View License

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"

Cite As

Lorgio Teodovich (2024). SerialIO mex (https://www.mathworks.com/matlabcentral/fileexchange/25478-serialio-mex), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Use COM Objects in MATLAB in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.3.0.0

Add visul 2005-8 compatibility.

1.2.0.0

C

1.1.0.0

Change #include <process.h>.

1.0.0.0