Azzera filtri
Azzera filtri

Error with Callback

1 visualizzazione (ultimi 30 giorni)
Steve
Steve il 13 Feb 2012
Modificato: Cedric il 10 Ott 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 Commento
Walter Roberson
Walter Roberson il 13 Feb 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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by