Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

how to generate pulse trains that has time delay from the sample clock??

I have a sampleclock,
and based on that, i want to generete such a pulse train that:
for a specific delay time after every sample clock's rising edge, generate one pulse with specified high level duration.
i tried to use HW single point update but seems it does not work
i am using C++ with DAQmx
so what i did is :
1. config the COChanTime for the task,
2. Config SampleClk for this task, with HWsingle point updates option.
3. start the task
it seems the hardware single point has no effect
i also tried the MAE to build a task with continuous(HW Timed Update) but what ever parameter i input, it just run for a very short time then gives error,
and seems the pulsed thus generated has no correlation with the HW trigger.
thanks alot
 
 
0 Kudos
Message 1 of 4
(4,217 Views)
Hello shelper,

It looks like you are using Visual C++ and the DAQmx driver to program a pulse train application. Take a look at the NI-DAQmx C Reference Help for counter programming call references and generating pulses.

What hardware are you using?

Take a look at the following KnowledgeBase to help you out:

How Can I Generate Two Pulse Trains Phase Shifted from Each Other on My E Series Card?

It might not be exactly what you are looking for but the theory is there. You can also look into setting the intial delay, which
is the amount of time the output remains at the idle state before generating the pulse.

Is this something that you can use in your application or have I misunderstood your application?

Regards,
  Sandra T.

Application Engineer | National Instruments
0 Kudos
Message 2 of 4
(4,202 Views)
exactly what u said
but the question is how to generate single triggered pulse ?
i tried several functions ,but no....
could u pls tell me what function should i use to make this pulse?
thanks alot!
0 Kudos
Message 3 of 4
(4,194 Views)
Hello shelper,

You want to output a triggered single pulse train. One thing you want to consider, do you want to make this signal retriggerable?

One way to delay your pulse is to wire a time delay to the "Initial Delay" pin on the DAQmx Create Channel.vi. The "initial delay" is the amount of time in seconds to wait before generating the first pulse, in most cases after you have gotten a trigger.

Take a look at the following shipping examples in LabVIEW:

Gen Dig Pulse-Retriggerable.vi

Gen Dig Pulse Train-Continuous-Dig Start.vi


Regards,
  Sandra T.

Applications Engineer | National Instruments
0 Kudos
Message 4 of 4
(4,183 Views)