Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating multiple Pulse Trains.

I am trying to generate two different pulse trains. Once the first pulse train has begun I need to start the
second pulse train approximately .69444 ms after the first has started. I am currently using the two counter channels on the NI ELVIS, but the second pulse doesn't always start after the first, but it does work sometimes. How can I fix this? Attached is my vi file.

Thanks,

David

Note: Each pulse train has a 33% duty cycle.
0 Kudos
Message 1 of 3
(8,175 Views)
Hello,

Here is what I would try:

1. Set up counter 0 to perform a continuous pulse train (see the LabVIEW example called Gen Dig Pulse Train-Continuous.vi)
2. Set up counter 1 to perform a continuous pulse train with a digital start (see the LabVIEW example Gen Dig Pulse Train-Continuous-Dig Start.vi)
A. Modify this example code so that the trigger source is your counter 0 output.
B. Modify this example code so that the initial delay value of the pulse train is 0.7 milliseconds (or whatever delay you want). Create the delay with the input to the DAQmx Create Channel VI (the delay is currently set with a default of 0.00 seconds).

What you are doing is triggering the second counter off of the rising edge of the first counter. So, counter 0 will start generating a pulse train. Counter 1 will not start until the rising edge of counter 0's first pulse has occurred. Once this trigger has occurred, Counter 1 will start (after the initial delay time of 0.7 ms has passed). You can cut and paste to put the code of the two examples together.

Hope this works for you,

Sam
Message 2 of 3
(8,168 Views)
Thank you so much, that fixed the problem!!!
0 Kudos
Message 3 of 3
(8,166 Views)