02-10-2010 03:12 AM
Hi,
I am using PXI 6259 card and LabWindows 8.0 for PWM generation.
System needs 20 PWM signals.
I am using sample closk source as Counter0 internal output, and generating a square wave from SquareWave() function.
when i call DAQmxWriteDigitalU32 with the generated data from SquareWave() function PWm signal is not generated on the line.
double Squarearray[1000];
SquareWave (1000, 1.0, 10E-3, &phase, 25.0, Squarearray);
DAQmxErrChk(CreateDAQTaskIn_PWM(&taskOut));
DAQmxErrChk(DAQmxCfgOutputBuffer (taskOut, 1000));
DAQmxErrChk(DAQmxWriteDigitalU32 (taskOut, 500, 1, 10.0, DAQmx_Val_GroupByScanNumber,(uInt32*)Squarearray, &samples, 0));
Above is the piece of code creating problem
Can anyone help??
02-10-2010 07:31 AM
Have a look at the example in this thread:
http://forums.ni.com/ni/board/message?board.id=180&message.id=14705