Timer Callback Function Variable period
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Farid Samara
am 5 Feb. 2016
Beantwortet: Walter Roberson
am 6 Feb. 2016
Hi,
I have successfully built is timer callback function in matalb to control my stepper motor. The period in my timer function is currently a constant and doesnt change. t.Period = timestep;
Is it possible to change the period, or the variable 'timestep' while my timer is running?
For example, if I have 20 steps to execute I want my 'timestep' to be an array of 20 with different times for each execution?
Is it possible to have the period changing from one execution to the other?
Cheers
Farid
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 6 Feb. 2016
No, the timer period cannot be changed while the timer is active.
You can have the TimerFcn stop() the timer and set a period and start() the timer again
0 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!