08-31-2020 11:46 AM
I want to be able to output X amount of pulses and a particular frequency. So for a stepper motor control, I would say want 40 pulses sent with a 500hz frequency and 50% duty cycle. I want to be able to vary the number of pulses and/or frequency as needed on the program.
Solved! Go to Solution.
08-31-2020 12:39 PM - edited 08-31-2020 12:39 PM
Hi cmcandrews,
which DAQ hardware do you (intend to) use?
@cmcandrews wrote:
I would say want 40 pulses sent with a 500hz frequency and 50% duty cycle. I want to be able to vary the number of pulses and/or frequency as needed on the program.
There is a signal generation functions palette being able to create such signals. Did you play with those functions?
Btw. what have you tried and where are you stuck?
08-31-2020 01:08 PM
If I create a channel for Counter Out (Freq), if I write to that channel to start the pulses, I want to be able to say to output only 40 pulse for whatever frequency I change it to. I don't want it to depend on time.
09-01-2020 01:19 AM
Hi cmcandrews,
you didn't answer any of my questions…
Using a hardware-timed DO task it's quite easy to output the desired waveform.
When you want to use a CTR task then I guess you need to use two counters, one to generate the pulse train, the other to gate the output to the desired amount of pulses. (I'm not an expert with counter tasks in DAQmx.)
09-01-2020 05:38 AM
I found it. The answer is to use the DMQmx Timing in Implicit then use Finite sample and state sample count.