Why DurationInSeconds doesn't work?

5 ビュー (過去 30 日間)
Jingyuan Dong
Jingyuan Dong 2014 年 4 月 10 日
編集済み: per isakson 2014 年 7 月 14 日
Hello,
We are trying to use PCI6602 Daqboard to generate a serial of pulses to control servo. Our program is pretty simple like this:
s=daq.createSession('ni');
s.addCounterOutputChannel('Dev1','ctr0','PulseGeneration');
ch1=s.Channels(1);
for i=1:24
ch1.DutyCycle=0.08+0.006*(i-1);
s.DurationInSeconds=0.204;
s.startForeground();
end
It worked before. But these days, it seems like 's.DurationInSeconds' doesn't work. The signal generated by Daqboard is attached below. The duration time of signal sequence is much longer than 204 ms, which it suppose to be.
Anyone knows why?
Thanks

採用された回答

Sruthi Ayloo
Sruthi Ayloo 2014 年 7 月 10 日
I believe that the difference between s.DurationInSeconds and the actual duration of signal generation is a bug. The difference appears to be a constant offset approx 0.1s for MATLAB 7.14 (R2012a) and the offset is relatively more significant when the DurationInSeconds is small. This bug exists in MATLAB 8.3 (R2014a) as well. As a temporary workaround, you can adjust the DurationInSeconds accordingly.
  1 件のコメント
Jingyuan Dong
Jingyuan Dong 2014 年 7 月 14 日
I got the same answer from MATLAB support group too. We also tried MATLAB R2013a as well, the offset is about 0.2s.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimultaneous and Synchronized Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by