Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Do gui from the data receive in com port

조회 수: 4 (최근 30일)
Diresh kumar
Diresh kumar 2012년 4월 11일
마감: MATLAB Answer Bot 2021년 8월 20일
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
Walter Roberson
Walter Roberson 2012년 4월 18일
http://www.mathworks.com/matlabcentral/answers/29922-why-your-question-is-not-urgent-or-an-emergency
Walter Roberson
Walter Roberson 2012년 4월 18일
There is an example in the file exchange.

답변 (1개)

Wasim Akhlaq
Wasim Akhlaq 2012년 4월 18일
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
Walter Roberson
Walter Roberson 2012년 4월 18일
I think the decimal data is what is in the range 0-1023, not 1024 items of data.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by