Is it possible to generate a single pulse in a counter output channel with NI-DAQmx?

15 次查看(过去 30 天)
Hi,
I want to generate a single pulse in a counter output channel with NI-DAQmx:
everything works fine for a continuous pulse with a given duration and also for a 2 scan generation:
start(dqPulseOut,"NumScans",2);
However, "NumScans" cannot be set equal to 1 and when I try:
write(dqPulseOut,1)
I get the error message: "Use start to initiate operations when counter output channels are configured".
Looking at the NI-DAQmx documentation, I found:
"When generating pulses, you can generate either a single pulse, a finite pulse train, or a continuous pulse train"
i.e., it looks possible from the NI-DAQmx point of view.
So, does anyone know if it is possible to perform a single pulse generation using a counter?
Thank you very much for your time!

回答(1 个)

chrisw23
chrisw23 2022-9-27
"You can accomplish this same behavior with a single counter is by setting up a continuous pulse output task with a start trigger and a pause trigger."
..maybe this helps

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by