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  
 
 [ 5 post ] 

 Relevant Pages 

1. GAWK: Question on using filefuncs.so (creating arrays in extension functions)

2. "how I can calculte the time between two edges of square wave

3. how I can calculte the time between two edges of square wave

4. 10kHz+ Square wave generation

5. Square wave

6. Property Assignment Syntax on Controls Made Using the Create() Built-in Function

7. how to create a Snapshot of subroutines or functions used in a project

8. Q: Creating an object member function using exec

9. Using the C functions to create Widgets

10. How do you pass an array of characters using the DLL functions

11. Where would I find Uniform White Noise.vi, Square Wave.vi, and Sine Wave.vi?

12. Using an array with a library function

 

 
Powered by phpBB® Forum Software