LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to generate PWM using digital line

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??

 

0 Kudos
Message 1 of 2
(3,590 Views)

Have a look at the example in this thread:

http://forums.ni.com/ni/board/message?board.id=180&message.id=14705

 

0 Kudos
Message 2 of 2
(3,583 Views)