Borrar filtros
Borrar filtros

Error with Callback

1 visualización (últimos 30 días)
Steve
Steve el 13 de Feb. de 2012
Editada: Cedric el 10 de Oct. de 2013
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 comentario
Walter Roberson
Walter Roberson el 13 de Feb. de 2012
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by