LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ni5401 how to generate 4 cycles of a sine wave at a time

I'd like to generate 4 cycles of a 100kHz sine wave using a ni5401.  I'm currently able to generate a sinewave at 100kHz countinuously, but I need to stop after 4 cycles and then do some other processing and then restart another 4 cycles and then stop etc...  any help is appreciated

Message 1 of 2
(2,816 Views)

hi htch,

 

Unfortunately this isn't really the ideal application for a 5401. This application is something that could be accomplished fairly easily with an arbitrary waveform generator, or even a multifuction DAQ card, as long as it had a sample rate of at lease 2 MS/s. The 5401, however, is an arbitrary function generator, which means that it is meant to generate continuously, not a finite number of samples. 

 

What you could try to do is use software timing to exit the loop after a certain amount of time has elapsed. However, you must keep in mind that software timing is not as accurate as hardware timing, and you may not generate exactly the amount of samples that you expect. 

Message 2 of 2
(2,788 Views)