Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate high frequency digital waveform

Solved!
Go to solution

Hi, all,

 

I have some problems. Nowadays I'm trying to generate several high frequency digital waves using my DAQ board (PCI-6251). The duty cycle of the waveforms have to be adjustable.

The required frequency is 100kHz. 

 

To do that, I tried several solutions:

1) I used the counters in the DAQ to generate the waveforms, and it worked fine.  However, I have only two counters. In my application, I need at least three waveforms with different duty cycle;

2) I used a "for loop" and some "case structures" in labview to generate the waveform pattern, and then feed them to the digital I/Os. However, the problem of this solution is that the frequency of the generated waveform can not be high.

3) I used a "Digital pattern generator" in Labview to generate the waveforms and then feed them to the digital I/Os. The time base in this case is from external source (200kHz). However, with this solution, the duty cycle is not adjustable.

 

Please give me some hints on how to make such waveforms.  Your helps are appreciated.

 

0 Kudos
Message 1 of 5
(5,793 Views)

Hey tingxuejh,

 

Can you provide more information regarding how the card may be used?  Are the DOs necessarily independent (i.e. will they be run at different rates and duty cycles)?

 

How about setting the regeneration mode in the DAQmx Write property node to true?  This should allow you to regenerate all samples in a buffer so you should only really have to write one period each time you change the duty cycle.

 

Cheers,

 

Matt

0 Kudos
Message 2 of 5
(5,790 Views)

Hi,Matt,

 

Thank you for your reply. Hereby I would like to provide you more information.

 

The waveforms are actually with the same frequencies, but different duty cycles, as you can see from the picture below. However I need the duty cycles to be adjustable so that I can adjust them during my measurements.

 

Since I'm new to DAQ, I'm not really sure about how to use the regeneration mode in DAQmx. Could you provide me some examples if possible?

 

Waveforms.jpg

 

Thank you for your help, and I hope it will not take too much of your time.

 

Cheers,

tingxuejh

0 Kudos
Message 3 of 5
(5,773 Views)
Solution
Accepted by topic author tingxuejh

OK, so I may be mistaken, but after mucking around for a bit, I realized that the regeneration ought to be automatic - that is, if you right a pattern and then just let your VI run in a while loop, you will find that the generation is continuous.  Check out the Correlated Dig Write with Counter in the Labview example finder.  You can exploit this such that you get the duty cycle you are looking for.  You can divide down the signal such that you write a single period consisting of a series of 0's and 1's.  That is, if you want a 100 kHz wave with a 20% duty cycle, you write a digital waveform pattern a 1100000000 at a rate of 1MHz.  Using this technique, the resolution of the duty cycle will be limited by the onboard clock speed (80 MHz = 0.125%).

 

Let me know if this makes sense - I am unable to reproduce this on my desktop and have never had to do this before.

 

Cheers, Matt

Message 4 of 5
(5,749 Views)

Hi,Matt,

 

Thank you for your information, I think this one should work. However I have two questions regarding to that:

1) I can't find the Correlated Dig Write vi in the example finder, could you show me a picture?

2) I have some difficulty in writting the digital waveform pattern. Could you show me how to do it?

 

Thank you for your help and sorry for so much disturbing.

 

Cheers,

Tingxuejh

0 Kudos
Message 5 of 5
(5,736 Views)