05-04-2010 01:50 PM
Hello
I am trying to create a time signal after taking samples but I can't.
I am trying to store the sampled values to a replace array subset, i used different methods and sometimes store the last value sometimes nothing.
I think i am doing a mistake to the input as an n-dimension array.
I attached the last method that i used in a picture...
I would be very thankful if you could help me
Regards
Solved! Go to Solution.
05-04-2010 03:24 PM
The simple solution is to simply wire the output of your read operation to your loop border and enable auto-indexing. This will give you an array of values. You only have 1000 samples, so that's not going to be too taxing in terms of memory thrashing. If you want to pre-allocate the array (as you should for large arrays), then the allocation should be done outside the loop and then wired to a shift register. Inside the loop you use Replace Array Subset.
Just curious: If you have a waveform chart inside the loop why do you need a graph outside?
Note that the dt property of the timed loop is in msec, but the dt component of the waveform cluster is in seconds.
05-04-2010 03:33 PM
I dont know whether I have understood your problem or not, but one suggestion, you need not initialize a array I believe,
Use shift register outside the timed loop, initialize there to zero and use Insert into array which updates the array using while loop index.
I believe you are reading from CRIO,AIO, convert the FXP to DBL and then insert into array (no harm if you don't do).
The timed loop you have programmed the dt to 10, you can directly wire it to Waveform graph.
Assume this solves, do let us know.
05-05-2010 02:29 AM
Finally it was too simple...
Thank you!
the graph outside is to check if i am getting anything outside. I am planning to connect the time signal to FFT power spectrum.vi to analyze my data.
Regards