06-17-2013 12:55 PM
Hello I am trying to create a VI that will generate a waveform from two 1D arrays, one for the amplitude of a section of the waveform and another for the duration of that section. For example if I were to put in [1,2,3] into the amplitude array and [2,5,10] into the duration array I would receive a graph that had an amplitude of 1 for 2 seconds, then amplitude 2 for 5 seconds, then aplitude 3 for 10 seconds. I am using the Append Waveform function to do this.
I have a VI that will generate the amplitudes correctly, but the delays do not work, each amplitude is only true for one second a piece, no matter what i put into the delay array. Does anyone have any suggestions on how to force the amplitudes to be active for a given amount of time?
I have attached a picture of my code so far.
Thank you
Solved! Go to Solution.
06-17-2013 01:04 PM
For the build square wave, you need to alter the Sampling Information. It is a cluster with Fs (sampling frequency) and #s (number of samples). You need to calculate how many samples to do given your desired sample rate.
06-17-2013 01:17 PM - edited 06-17-2013 01:19 PM
I think this will do what you are looking for.
06-17-2013 01:19 PM
Thanks a lot that looks great.