LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I generate a Sample Clock and output it?

Hello all,

 

I am trying to generate a sample clock with a variable frequency (around 100khz - 2mhz) that I can use to send a digital signal. Additionally, I want to output the sample clock so that the device to which I am outputing receives a sample clock and the synchronized signal.

 

I'm using a 6070E DAQ card with a LabVIEW computer. I've tried to configure the sample clock daqmx vi to use the 20MHz onboard timebase to generate the clock signal, but I can't get it to generate a sine wave faster than 50 khz. I configured an AO square wave output, and wired that to a digital input and an oscilloscope. I wanted to set the sample clock vi to use the digital in as the clock source. Is this approach reasonable, or is there a way to do it all through the software?

 

Is there anyway I can do this? I feel like I'm missing something very simple.

 

Any help is appreciated,

Thanks,

Neil

0 Kudos
Message 1 of 4
(3,518 Views)

Hi.

 

This sounds fine.

 

I have attached an example from the Labview example finder which synchrises Digital and Analog tasks. 

 

let me know what you think or if you have any other questions.


Regards,

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 4
(3,498 Views)

Thanks! That helps a lot!

 

However, I am still getting an error. It seems to work with analog input, but I changed the virtual channel to digital output and changed daqmx read to daqmx write (1D U8 1chan Nsamp) so that I could write a digital signal. I get this error:

 

 Error -200077 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Sample Clock).vi:1->Multi-Function-Ctr Pulse Train Generation for AI Sample Clock.vi

Possible reason(s):

Measurements: Requested value is not a supported value for this property.

Property: SampTimingType
You Have Requested: Sample Clock
You Can Select: On Demand

Task Name: _unnamedTask<5>

 

 

What am I doing wrong?

 

 Also, the lab gave me access to a 6534 card, since what I'm doing is mostly digital. Would this be better to use, and could I use it? I didn't see options to select a counter on the 6534, does it have one? Finally, is there some sort of comparison between NI cards out there, so I could check the specs and see if my application would be fine with a 6070E or if it needs a faster digital card like the 6534?

 

Thanks for your help and time,

Neil 

0 Kudos
Message 3 of 4
(3,472 Views)

Hi Neil,

 

The E-Series card will not support correlated DIO which means that a sample clock will not be able to be used with the digital task. M-Series boards are able to handle correlated DIO.  In addition, the NI-6534 does not have counters which would not allow you to use this program. However, if you had another way to generate a clock, this board would be able to import the clock and use that to sample. This is a good place to begin comparing and learning more about the different NI hardware. You can narrow down the different products based on the criteria you select. Hope this helps.

 

Regards,

Kent

Applications Engineer

0 Kudos
Message 4 of 4
(3,448 Views)