creating a square wave using an array function
Author Message
creating a square wave using an array function

I want to know if is possible to create a square/pulse waveform using
a build in array.  I need a square/pulse wave to which I can
manipulate the width of the pulse.
thanks.

Sat, 08 Oct 2005 02:09:33 GMT
creating a square wave using an array function
Have you tried the built-in "Square Wave.vi"?  It is located in the
Function pallete Analyze > Signal Processing > Signal Generation.

If you have the base package of LV, you'll have to build the square
wave yourself.  If you have to do this, try building two arrays, the
first array will be zeros and second array filled with ones (or
whatever you want you amplitude to be.  You can concatante those
arrays in a for loop n times until you have the signal you desire.

Post back if you need an example

Tim

Sat, 08 Oct 2005 02:27:40 GMT
creating a square wave using an array function
Thanks for your answer!  I tried the squarewave.vi but it doesn't work
for me because I need to combine it with a sine waveform and I have to
be able to change the location and width of the square waveform.  Can
you provide me with the example using the two arrays.
Thank you very much.

Sat, 08 Oct 2005 02:34:11 GMT
creating a square wave using an array function
That is exactly what I am trying to do.  THank you so much, I really
appreciate your help.  You can't imagine how much you helped me out.
Now I have a good start point to finish what i have to do.  I still
have one question, I'm sorry to bother, why do you use the reciprocal
of the sample rate.

Sat, 08 Oct 2005 04:03:47 GMT
creating a square wave using an array function
The reciprocal of the sample rate is used simply for plotting
purposes.  When using a Waveform Graph you bundle your array with a
start time and delta t.  Delta t is just the reciprocal of the sample
frequency.

BTW, depending on what your sending the "build" waveform to, you might
need to ensure that the transitions between different types of signals
is smooth (e.g. end of the sine wave and start of the square wave).

Tim

Sat, 08 Oct 2005 05:14:32 GMT

 Page 1 of 1 [ 5 post ]

Relevant Pages