Quantcast
Channel: All LabVIEW posts
Viewing all articles
Browse latest Browse all 203351

Re: signal generation using DAQMx.vi

$
0
0

juz wrote:

 I am trying to generated a single sinwave with one of values of the 21 fequencies and amplitude. 

generating the first sinewave with 100Hz and amplitude of 1.5 for 1000milesecond then the next value of frequency and

amplitude for 1000milsecond still the end value of frequency which is 10KHz and amplitude of 0.5.

 


Consider just the last "sine wave", 1 second of a 10 KHz sinusoid.  I assume that you want to have the output "look like" a sine wave.  Recall that this is a digital output, so the waveform will be a bunch of points.  Draw a single sine wave and put 10 points on it uniformly spaced -- if they were connected by straight lines (or were step functions), would that be "close enough" for you, or would you want more points?  Note that you need at least two points, one high and one low, to get something that alternates at 10 KHz (but with only two points, it will definitely be a square, not a sine, wave).

 

Suppose you say 10 points is enough.  Then since you have 10,000 sinusoids per second, and 10 points per sinusoid, you'll need to generate points at 100KHz!  Does your D/A convert support such a high output rate?  Note that the sample code you provided seemed to be outputting points at 1 KHz.

 

There's no difficulty, in principle, with having LabVIEW generate data points at 100,000 points/second (you probably would want to "do the math" yourself, using the Sine function from the Math Palette instead of using an Express VI), but getting all of this data smoothly to an output device might be a bit of a trick.  What hardware are you using?

 

BS


Viewing all articles
Browse latest Browse all 203351


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>