Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

generating a double pulse sequence using DAQmx

Hi,

 

I am trying to generate a two pulse sequence using DAQmx. Currently I can output a digital pulse train continuously using the DAQmx example. How can I modify this program to generate a two pulse sequence instead?

 

What I would like to be able to do:

 

1. Generate two pulses in time from the counter output separated by a time t.

2. I want to be able to modify the width (high time) and separation between the two pulses and their repitition rate.

 

I am using counter output from BNC2110 with PCI-6733 card. Any help is appreciated.

 

Thanks,

prdbhp

 

0 Kudos
Message 1 of 7
(3,795 Views)

You should be able to modify the example called Multi-Function-Ctr Pulse Train Generation for AI Sample Clock.vi

 

Instead of having the top task be an analog input task you would adjust it to be a Count Output task that would be identical to the bottom task. Set the top one to be Ctr1 and the bottom one to be Ctr0.

 

Set the Inital delay to adjust the separation.

 

Adjust the high time and other parameters as desired.

CTA, CLA, MTFBWY
0 Kudos
Message 2 of 7
(3,781 Views)

Good morning,

 

I think you should check the next examples on our Example Finder, they can help you get an idea of how can you accomplish your objective. I believe that you can use a trigger and make it retriggerable to be generating the pulses every certain period. With the other examples, you can see how to control the pulse width and the period between pulses.

 

Meas Pulse Width.vi (Hardware Input and Output>DAQmx>Counter Measurements>Period or Pulse Width)

 

Meas Pulse Freq-Buffered-Ext Clk-Arm Start-Cont.vi (Hardware Input and Output>DAQmx>Counter Measurements>Period or Pulse Width)

 

Meas Two Edge Separation.vi (Hardware Input and Output>DAQmx>Counter Measurements>Two-Signal Edge-Separation)

Gen Dig Pulse-Retriggerable (Hardware Input and Output>DAQmx>Generating Digital Pulses)

 

Thanks,

0 Kudos
Message 3 of 7
(3,780 Views)

Hi,

 

Thanks for the info.Couple of questions:

 

1. I cannot find the example "AI Sample Clock.vi". I am new to using DAQmx. Could you point me to where I can find it. I am using Labview version 9.

 

2. My device (BNC-2110) has only one Ctr0 output. And I want to be able to ouput the double pulse train (with a certian rep rate) through that. Is that possible?

 

Thanks.

 

 

0 Kudos
Message 4 of 7
(3,772 Views)

Hi amezam,

 

Thanks. I am playing around with the examples and I am now able to generate a continuous pulse train from the Ctr0 output and control the pulse width and repetition rate.

 

The issue is that I want the 1st pulse say, width "w", and my 2nd pulse (following the 1st pulse) width to be "2w" or some other different width. Repeating this combination might be possible with a trigger source, but how do I generate the two pulses with different widths coming out the same counter? Excuse me if I am asking something trivial. I am a newbie with DAQmx.

 

Thanks for your help!

 

0 Kudos
Message 5 of 7
(3,770 Views)

Go to Help >> Find Examples

 

PFI 13 is Ctr1 Output

CTA, CLA, MTFBWY
0 Kudos
Message 6 of 7
(3,769 Views)

Thanks, I found the example. I am able to output pulses from the two counters Ctr0 and 1. This is basically taking the Ctr1 output and sampling it at the Ctr0 output frequency.

But, I don't see how I can get the two differnent pulse widths out of the same Counter ouput?

 

 

 

 

 

0 Kudos
Message 7 of 7
(3,753 Views)