Effacer les filtres
Effacer les filtres

Error with Callback

1 vue (au cours des 30 derniers jours)
Steve
Steve le 13 Fév 2012
Modifié(e) : Cedric le 10 Oct 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 commentaire
Walter Roberson
Walter Roberson le 13 Fév 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by