LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create time signal

Solved!
Go to solution

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

0 Kudos
Message 1 of 4
(4,503 Views)
Solution
Accepted by Zaxos

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.

0 Kudos
Message 2 of 4
(4,469 Views)

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.

0 Kudos
Message 3 of 4
(4,467 Views)

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

0 Kudos
Message 4 of 4
(4,447 Views)