03-02-2016 03:03 PM
Thank you very much. It was a great help. 🙂
03-03-2016 03:26 AM - edited 03-03-2016 03:28 AM
You're welcome!
It would be great if you can mark the most relevant answer as solution to better help future readers of this thread.
03-03-2016 06:50 AM
Hello,
just a simple example to generate a sinus on 2 output channels:
DAQmxCreateTask("",&taskHandleCH1_2);
DAQmxCreateAOVoltageChan(taskHandleCH1_2,"Dev1/ao0:1","",-10.0,10.0,DAQmx_Val_Volts,NULL);
DAQmxCfgSampClkTiming (taskHandleCH1_2, "",Frequency * Samples, DAQmx_Val_Rising, DAQmx_Val_ContSamps, Samples);
//Sinus on channel1
SineWave (Samples, Amplitude , 1.0/ (double)Samples, &Phase, Sinus);
//Sinus on channel2
SineWave (Samples, Amplitude , 1.0/ (double)Samples, &Phase, Sinus+Samples);
/*********************************************/
// DAQmx Write Code
/*********************************************/
// Channel 1 and 2
DAQmxWriteAnalogF64 (taskHandleCH1_2, Samples, 0, 10.0, DAQmx_Val_GroupByChannel,
Sinus, NULL, NULL);
/*********************************************/
// DAQmx Start Code
/*********************************************/
DAQmxStartTask(taskHandleCH1_2);
I just test this with ni pxi4461 and it works fine.