I am attempting to call one gui function from a gui function in a gui script so that I can pass various handles around.
Essentially how the program works is: Checkbox to stream data.
function Checkbox_Callback(hObjects,eventdata,handles) onoff = get(hObject,'Value'); if onoff == 1 a = timer; set(a,'executionMode','fixedRate','Period',1,'TimerFcn','Stream'); start(a) elseif onoff == 0 stop(a) end
The next function is used to call the data from an external program. The function definitely works, it's just the issue of how to call it correctly from the set(a,'TimerFcn',XXXXXXXXX);
The "Stream" function is along these lines:
function Stream(hObject,eventdata,handles)XPNetConnect();out = XPNetRecv();variable1 = out.Variable1;... etc%Calculations
handles.Value = something;guidata(hObject, handles);Run_Another_Callback(hObject, eventdata, handles)
Hopefully you get the gist of what I'm trying to do.
I would really appreciate the help.
Thank you in advance.
Best Answer