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.

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

도움말 센터File Exchange에서 C2000 Microcontroller Blockset에 대해 자세히 알아보기

질문:

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