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

2 views (last 30 days)
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.

Answers (1)

Madhura Suresh
Madhura Suresh on 10 May 2014
Nope, properties for background operations cannot be changed. You have to pause the background operation, and then change the property and start again.

Communities

More Answers in the  Power Electronics Control

Categories

Find more on Periodic Waveform Generation in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!