Is it possible to change frequency of hardware generated PWM on the fly?

s = daq.createSession('ni');
ch = s.addCounterOutputChannel('Dev1', 0, 'PulseGeneration');
s.IsContinuous = true;
s.startBackground;
% now try change freq
ch.Frequency = 200;
% produces error:
The property cannot be changed while the Session is running.

回答 (1 件)

Madhura Suresh
Madhura Suresh 2014 年 5 月 10 日

0 投票

Nope, properties for background operations cannot be changed. You have to pause the background operation, and then change the property and start again.

コミュニティ

カテゴリ

ヘルプ センター および File ExchangePeriodic Waveform Generation についてさらに検索

質問済み:

2014 年 3 月 17 日

回答済み:

2014 年 5 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by