필터 지우기
필터 지우기

Error with Callback

조회 수: 1 (최근 30일)
Steve
Steve 2012년 2월 13일
편집: Cedric 2013년 10월 10일
I am trying to use the GUI environment to obtain data from the serial port. Ideally I would like to have a serial config file serparate from my main file with the toggle button callback and everything, but that has been giving me trouble.
So I am trying to do the serial config whent eh toggle button is pressed. So far when I run the program, the program plots the data coming into the serial port just fine, however when I stop the program by pressing the toggle button, I get these errors:
Error in ==> TEST>togglebutton1_Callback at 122
Out5(i) = fread(s);
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> TEST at 45
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)TEST('togglebutton1_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
My filename is TEST...I'm not sure how to get around this. Am I going about this in the right way?
Any advice would be greatly appreciated!
Thank you
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 2월 13일
What actual error does it report? For example does it report that s is not open, or that it does not exist?
It is not clear why your stop routine would have an fread() ?
I think we are going to need code.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by