11-25-2013 06:50 AM
Hello everyone ;
I have the following problem, i know i am a little new to this Labview Stuff, so i decided to ask you.
I need to fill an array of 1 dimension, this array is related to the impulse pattern of a signal as shown in the VI, the upper loop. The thing is that i cannot fill the array and all its inside values, it only takes the first value of the array. I dont know why.
To solve this problem i did a 2 dimensions array, for some reason it worked, in the lower loop, you can see it takes 4 numbers and place them in the array.
The main problem is that i need 1 dimension array to relate it with one function from my Signal generator (PICOTEST) in my lab. This function does not receive 2 dimensions arrays, but only one dimensioned.
If you could help me to fill this 1 dimension array asi it is shown in the VI or any alternative, i would be really greatfull.
Thanks, kind regards.
Stgo.
11-25-2013 08:03 AM
Sorry, but your code and your question do not make any sense to me. You do in fact get an array filled with 128 samples. Why you have it in a for loop is a mystery to me. Each time it iterates, the old array is overwritten with the first element equal to the amplitude and the rest are zero because you specified a pulse width of 1. Simple as that.
11-25-2013 08:20 AM
Thanks for the help, in fact i hadnt noticed that this width didnt allow more values to be shown in the array.
The weird is that i was expecting to create random values inside the array, so far the array is filled with the same value from position 0 to 3.
Do you have any other advince in this case?.
thanks.
11-25-2013 08:30 AM
If you want an array of random why do you use the pulse vi.
11-25-2013 08:39 AM
Because, the array sets up another function in a bigger program. This other function is the function "Arbitrary Waveform" that came with the drivers of the signal generator PICOTEST G5100A.
The thing is that with the impulse pattern function, the "Arbitrary Waveform" (AW) is set up as the impulse i need. The "AW" requires and array of 1 dimension where its values are the amplitude and the Samples. Therefore if i have 10 impulses values inside the array, i can set up the impulses of this "AW" and its characteristics the way i need it.
Thanks for the help.
11-25-2013 08:49 AM
You simply do not understand what the function does. It creates a pulse that has an amplitude you define and equal to the width number of points. It has nothing to do with random values. The width has nothing to with more values in the array. You have an array with 128 values in it.
11-25-2013 09:05 AM
So basicly you want to create a square wave which represents you waveform generator?
11-25-2013 09:05 AM
Yes i understand that it has nothing to do with random values, i get that.
My point is that i want random amplitude values for the function, that is why i use that.
I understand what you say that i have 128 values in it, so if i lower the samples i have a smaller array right ?.
So, in conclution, no matter what i do, through the impulse pattern, i can not get different values in the array right ?.
Thanks for your help.
11-25-2013 09:08 AM
Not exactly. What i want is to create impulses through the signal generator using this Arbitrary function.The impulses i wanted them with random amplitude, this way i could have this variation as an output.
Thanks.
11-25-2013 09:15 AM
You mean like this^^^^^?
You multiply the the input from the function generator with a random number provided by labview.
Which you then use as an output?