Image acquisition using multiple timers.

2 ビュー (過去 30 日間)
Akshay Mhetras
Akshay Mhetras 2011 年 7 月 18 日
Hello,
I am working with MATLAB for continuous aquisition of images of a sedimentation system. As I need to capture the sedimentation rates, I need for the images to be captured at different time rates. I wondered whether I could use multiple timers in the same programme which work at different time rates to capture the images. How do I put successive timers in the same program? Any help in this regard will be appreciated. Thank you!!

採用された回答

Walter Roberson
Walter Roberson 2011 年 7 月 18 日
Gerd's answer looks workable. I wonder, though, why you are using multiple timers for that case? If you only need one timer at a time, why not use a single timer and at each point set() its timeout as appropriate? There are various different ways you can keep track of which "state" you are in.

その他の回答 (2 件)

Gerd
Gerd 2011 年 7 月 18 日
Hi Akshay,
you can generate multiple timers in Matlab.
timer1=timer;
timer2=timer;
with set method you can set the approxiate parameters to the different timers. You can use different callback function which are executed when the timer occurs.
Gerd

Akshay Mhetras
Akshay Mhetras 2011 年 7 月 18 日
I put three timers at different periods (rates). How do I start the process at once, so that once timer1 is over, timer2 starts and so on, as I need to automate the whole image acquisition process...
  1 件のコメント
Gerd
Gerd 2011 年 7 月 18 日
You can use the timer callback function.
start(timer1)
callback function timer1:
stop(timer1)
start(timer2)
and so on

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by