Do gui from the data receive in com port

Hello, I'm new in matlab. I'm receiving decimal data (0-1023) from the com port. How i gonna do a GUI from the data receive in the certain com port? Ur help really appreciated.

2 comentarios

Walter Roberson
Walter Roberson el 18 de Abr. de 2012
http://www.mathworks.com/matlabcentral/answers/29922-why-your-question-is-not-urgent-or-an-emergency
Walter Roberson
Walter Roberson el 18 de Abr. de 2012
There is an example in the file exchange.

Respuestas (1)

Wasim Akhlaq
Wasim Akhlaq el 18 de Abr. de 2012
You can receive data from com port (Serially). Use This Command
Ser_Obj = serial(); % Serial Communication Object (Default Setting) %
for i = 1 : 1024 % for 0 - 1023 decimal received %
fscanf (Ser_Obj); % for receiving data %
end
The formt of fscanf is given by (you can see on Matlab help)
A = fscanf(fid,format)
[A,count] = fscanf(fid,format,size)
and if you want to do in GUI then Make a GUI file and take a push button and write this code in push button. Doing this when you press the push button then you receive data.

1 comentario

Walter Roberson
Walter Roberson el 18 de Abr. de 2012
I think the decimal data is what is in the range 0-1023, not 1024 items of data.

La pregunta está cerrada.

Preguntada:

el 11 de Abr. de 2012

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by