stopping the timer



hi
i am trying to develop a GUI in which there is a toggle button that atarts and stops the timer so my pseudo code looks like this
val=get(hObject,'Value');
if(val==get(hObject,'Max'))
..
..
..
t=timer('TimerFcn',{@getdat_modified1,handles},'Period',10.0,'ExecutionMode','fixedRate');
start(t);
handles.t=t;


guidata(hObject,handles);


else if(val==get(hObject,'Min'))
t=handles.t;
stop(t);
end



So the problem is --the timer DOES NOT STOP
Also i tried with various options like storing the timer object t in application data of this toggle button still it does not stop. Rather it either gives an error at the line of 'stop(t)' or just does not stop the clock.
i tried to avoid storing 't' timer object in handles or application data and directly say 'stop' even then it does not work... it gives an error.

WHAT SHOULD I DO NOW?
can you please help me.

thanks and regards,
chalapathi
.



Relevant Pages

  • Re: tmer relay help needed
    ... toggleing doesnt work at all timer does not function at all if no ... Does it repeat when the timers expire? ... Open control switch to reset". ... eg It doesn't say toggle switch ...
    (sci.electronics.design)
  • Re: tmer relay help needed
    ... toggleing doesnt work at all timer does not function at all if no ... Does it repeat when the timers expire? ... Open control switch to reset". ... eg It doesn't say toggle switch ...
    (sci.electronics.basics)
  • Re: tmer relay help needed
    ... toggleing doesnt work at all timer does not function at all if no ... Does it repeat when the timers expire? ... Open control switch to reset". ... eg It doesn't say toggle switch ...
    (sci.electronics.misc)
  • Re: stopping the timer
    ... So the problem is --the timer DOES NOT STOP ... Also i tried with various options like storing the timer object t in application data of this toggle button still it does not stop. ... give it a unique tag. ...
    (comp.soft-sys.matlab)
  • Re: Pass a control into a .BAS?
    ... The name of the timer is TimerPing. ... is a timer object that was dropped on the .CTL form. ... If I switch back to design view, there is a timer object clearly visible. ...
    (microsoft.public.vb.general.discussion)