LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write sine wave onto DAQ card AO

Solved!
Go to solution

Hi all,

   

    I am using a NI-DAQ card 6009, and I am trying to generate a sine wave from LABVIEW 8.5 and then output it to the analog output of the DAQ card.

   

    The code I wrote was pretty smple. Generate a sine wave using "create analog signal", and then connect the sine wave to the "write" function DAQmx. The output of the "write" function goes into the task in of "DAQ assistant" outside of the loop.

 

    But I'm getting error message as follow:

    Error -200077 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Sample Clock)

   

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

   

    Settings regarding to sample timing in each of the 3 componets are:

 

    Creat analog signal: sample rate: 10K, block size(samples): 100

    Write: Analog, single channel, multiple sample, waveform

    DAQ assistant: timing settings:

                            Generationg mode: N samples

                             Samples to write:100

                             Rate(Hz): 10K

   

    Any help will be appriciated.

    Thanks.

 

Colin

0 Kudos
Message 1 of 5
(4,233 Views)

Have you looked at the specs of the 6009 or done a search of this error? It has no sample clock. The analog output is strictly software timed (On Demand). You have to write one sample at a time. As the specs say, you will have an update rate of about 150 Samples/sec.

0 Kudos
Message 2 of 5
(4,231 Views)
Solution
Accepted by topic author Keqin

You are seeing this error because the 6009 does not support hardware-timed analog output.  Did you look at the device's spec sheet?  It would appear not.  Here it is:

 

6009 analog output specs.PNG

 

Note that the maximum rate listed is 150S/s, and it is specified to be software timed.

 

So what you are trying to do is not possible with the 6009.  You'll need a 6221 or something similar.  Make sure whatever board you choose supports hardware-timed analog output at a rate fast enough for what you're trying to do.

 

 

Edit:  I see that Dennis beat me to it!

Message Edited by DianeS on 01-20-2010 04:04 PM
0 Kudos
Message 3 of 5
(4,228 Views)

hi

 

change 

samples to write to 1

and

rate(Hz) 150

 

regards

Regards
0 Kudos
Message 4 of 5
(4,204 Views)

nolsqn wrote:

hi

 

change 

samples to write to 1

and

rate(Hz) 150

 

regards


 

No. You cannot use anything that sets the rate.
0 Kudos
Message 5 of 5
(4,193 Views)