02-19-2011 01:21 PM
Hi,
I'm really new to Labview and programming so I'm having a lot of difficulties with the program. I'm trying to plot a sine wave using the "Sine Wave.vi" function and it just plots a straight line. I have no idea why it does this and would like to understand what is happening.
I know I can use sine wave generator to plot the sine wave but I'm having trouble with arrays/building arrays and I have no idea how to do it this way.
Any help at all would be appreciated!
Attached is my VI.
02-19-2011 02:13 PM
Your frequency specification is wrong and the build array is unnecessary. Have you looked at the example that the detailed link in the context help points you to?
Have you tried the Sine Waveform function or even the Express Simulate Signal? Neither requires you to create any array and your comment is a mystery to me.
02-19-2011 02:55 PM - edited 02-19-2011 02:56 PM
I've tried both but my biggest problem with labview is that I have little idea about arrays and how to use them correctly hence that unecessary build block. I chose to make a sine wave like this because my professor gave us a waveform in a text file and we have to read it in, plot it and then do a fourier transform. While I can do this with Sine Waveforum I don't know how to import a sine wave and then plot it if that makes sense.
Sorry for the really basic questions and my lack of understanding.
02-19-2011 04:48 PM
For reading the file, the simplest way is probably with the Read From Speadsheet function. There have been numerous questions on this subject. It will return a 1D array that you can wire directly to a graph but you will have to first extract the timing information (the dt) in order to do an FFT. Try reading the file and just create an indicator. You may have to experiment with the separator and transpose options. If you get stuck, attach what you have written and the file.
02-20-2011 09:37 AM
Hi,
You say you have little idea about arrays and how to use them. A good place to start is with some of the FREE tutorials available on the NI web site, lots of good stuff that will help you understand!
Alan