LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

non-Regenerative 3-phase SinWave with DAQmx

Hello, I need help generating an 3-phase sinusvoltage out of 3 Channels with CVI. The values far amplitude and frequency should be variable while the program is running. I took the DAQmx-Example ContGen_IntClk.c and varied it to my requirements. Hardware output card is PXI 6713. I set the Card to non-regenerative mode, created a loop for calculating sinform an write the output to buffer. Chose 360 samples per buffer and 1 cycle per sample. The frequency should be in range from 20 to 120 Hz. For 1 cycle per samples i instantly receive an error 200290, with 2 cycles per samples the error occur at frequency greater than 97 Hz, for 3 cycles per sample it runs without error. Is there any way to get this working stable with 1 cycle per buffer upto 120 Hz? 2nd Problem ist to stop the task. For my application it is necessary that the switch of frequency, amplitude and the end of data output is at the moment where the sin-function has value zero. DAQmx_Write_TotalSampPerChanGenerated returns always a value that is restless divisible by (samples per buffer), so that i can't extract an usable information for my task. Currently I'm working on stripping down my program to the basically function, so that you can take a look at the source code. thank you all for your suggestions... Kai
0 Kudos
Message 1 of 2
(2,936 Views)
Hello Kai,

attached you'll find a link to an example programm, which generates two independent sine waves on two analog output channels of an E Series multifunction DAQ device. You can change the frequency and the amplitude of the individual sine waves on the fly without causing glitches or phase shifts in the signal.

E Series Dynamic Sine Wave Generator - 2 Channels - CVI
http://zone.ni.com/devzone/cda/epd/p/id/1946

Regards
Ulrich
AE NICER
0 Kudos
Message 2 of 2
(2,891 Views)