Generate a specified number of pulse signals using NI USB-6211
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello all,
I need to generate a specified number of pulse signals using NI USB6211 and MATLAB daq toolbox. For example, 60 pulses are in need in about 1min of time. I'm now using code as follow. I use
DurationInSeconds
ch.Frequency
to control the number of pulse. But if the Frequency is high and Time is long, the number of pulse may not agree with my expect.
Can I generate a specified number of pulse signals with Counter output port in USB-6211 directly with MATLAB code?
I need precise control of number of the counter pulse and not too care about the time of pulse train.
test = daq.createSession('ni');
ch=addCounterOutputChannel(test,Device_ID,'ctr0','PulseGeneration');
ch.Frequency=1; % Palse per second
test.DurationInSeconds=60;
Thanks for your help.
댓글 수: 0
답변 (1개)
Brahmadev
2024년 5월 17일
You can refer to the following example to generate a pulse signal for generating pulse signals with NI devices:
Hope this helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 脉冲和瞬态指标에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!