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

6 views (last 30 days)
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!

Answers (1)

chrisw23
chrisw23 on 27 Sep 2022
"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

Categories

Find more on Data Acquisition Toolbox in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!