‎07-17-2007 05:51 PM
‎07-17-2007
11:50 PM
- last edited on
‎07-11-2025
02:40 PM
by
Content Cleaner
Hi eugenia,
If you are just starting out with National Instruments Data Acquisition I would highly recommend you use the NI-DAQmx driver instead of the Traditional NI-DAQ driver.
If you download and install the driver you will be able to install support of ANSI C. Once you do that you will have to open the example is the following folder: C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog Out\Generate Voltage\Cont Gen Volt Wfm-Int Clk
This writes a waveform to your Analog Output and then repeats that same output. In order to output a triangle waveform you will have to change the data being written to the DAQmxWriteAnalogF64 function. The data input to this is an array of values that will be written out to the analog output channel at every edge of the sample clock. You will need to write some C code to create an array of values that ramp up to create the triangular waveform you require.
You will also have to add DAQmxCfgDigEdgeStartTrig to configure your external trigger. Please refer to the NI-DAQmx C Reference Help for more information on NI-DAQmx functions.
Please let me know if this helps.
‎07-18-2007 11:26 AM
Hi Abhinav,
I don't want to change my drivers to nidaqmx because i have a lot of other applications in my computer written in traditional nidaq and i don't want to change them. Also in daqmx,(in labview) is it able to do continuous analog output without using while loop? I want to use a subvi that does continuous analog output inside another vi, and if i use daqmx, i can't do it without while loop, so my program stacks in the while loop. I have a program in labview that does simultaneously continuous analog input continuous analog output, and continuous pulse generation.Can i do all of those in one Vi simultaneously with daqmx? i have tried it before but i think we can't generate continuous signals or pulses without using while loop.This is the main reason that i don't want to use Daqmx. How can i do continuous analog output with traditional nidaq and in C language?
Thank you,
Eugenia
‎07-18-2007 11:45 PM
‎07-19-2007 09:47 AM
Hi Eugenia,
You mentioned "I don't want to change my drivers to nidaqmx because i have a lot of other applications in my computer written in traditional nidaq and i don't want to change them.". I just wanted to point out that it is quite possible to have both NI-DAQmx and Traditional NI-DAQ installed on the same computer, and to use the two drivers interchangably with the same device (assuming the device is supported in both drivers, which yours is). So, you could make new programs with NI-DAQmx and still use your old Traditional NI-DAQ programs as well.
I really agree with Abhinav and highly recommend that you use NI-DAQmx. DAQmx can do everything that Traditional NI-DAQ can do, and it's much easier to use. Trust me, once you get used to the newer API, you will be glad you switched! ![]()
‎07-19-2007 10:13 AM
‎07-19-2007 10:21 AM
‎07-20-2007 05:53 AM
Hi Dennis,
This example is not what i want to do,
I want for example the the waveform to continue ganarating while the vi has stopped( is not executing). This is possible with traditional nidaq, i i start the task i i dont use the Stop AO.vi. In nidaqmx this is not possible becouse if i dont use the AOStop.vi, the generation stops automaticaly when the VI stops executing.
‎07-20-2007 07:49 AM