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

2 次查看(过去 30 天)
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
Nope, properties for background operations cannot be changed. You have to pause the background operation, and then change the property and start again.

社区

更多回答在  Power Electronics Control

类别

Help CenterFile Exchange 中查找有关 Periodic Waveform Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by