Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

AO sine waveform generation DAQmx

Hi,

I am a newbie to DAQ and NI cards, I am using 6713 AO card, I was trying to run the C sample given by NI as I am going to use ANSI C. My object is to generate a waveform (may be sine or square); I could see a "DAQmxCreateAOVoltageChan()" used to generate analog output but his was a straight waveform. When I went through the document I could see that there was another function "DAQmxCreateAOFuncGenChan()" . This had some parameter constants mentioned about sine and sawtooth etc waves.  I jus tried replacing the parameters by calling with the following parameters "DAQmxCreateAOFuncGenChan(taskHandle,chan,"",DAQmx_Val_Sine,1000,10.00,0));" But that resulted in error.

Am I doing anything wrong? Do I have to change my approach needs to be changed. Can we generate a sine or sawtooth waveforms in a single above API? If we cannot what would be the steps. if we can generate what are the premliminary steps or api i need to call to make my API successful. I tried to a to study about the API... and i am still trying... Please do help me to get this done.

Thanks in advance,
Marutha
0 Kudos
Message 1 of 4
(4,018 Views)
Marutha,

Several of the preinstalled ANSI C examples can be used with that board to generate sine waveforms.  Try using the ContGen-IntClk.c example, which can be found in the DAQmx ANSI C folder under Analog Out\Generate Voltage\Cont Gen Volt Wfm-Int Clk.  This example generates a continuous sine wave.  If you need help finding this example, please let me know.

Regards,
Jason
0 Kudos
Message 2 of 4
(4,012 Views)
Hi,

Thanks for your quick response. Unfortunately  I am unable to find a file named "ContGen-IntClk.c". I tried searching the entire installation path "C:\Program Files\National Instruments" but in vain. Ii tried locating this file also in internet but could not find it out.

Please help me to locate this file.

Thanks in advance,
Marutha
0 Kudos
Message 3 of 4
(3,992 Views)
Marutha,

The location of the DAQmx ANSI C examples folder depends on which version of DAQmx is installed.  The following KB explains how to find this folder:

http://digital.ni.com/public.nsf/allkb/FB26BDA52FFFD4EE86257124005C36C3

In the NI-DAQmx installer, the Microsoft Visual C Support feature and the Examples subfeature must be installed for these examples to be copied to the hard drive.

- Jason

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