LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

inserting new column in 2D array retaining previous column values

Hello Everyone..

 

I've got a program in which simulate signal outputs signals with different frequencies. I want to store that signal amplitude values in 2D array. Each column of 2D array must contain that particular signals amplitude values. for eg: if 10 Hz is selected, the first column should have 10Hz signal's amplitude value, if 20 Hz is selected then second column should have its respective amplitude value but the first column should retain 10Hz signals amplitude value. 

 

 

How can I solvedo this? Pls help

 

 

IamAKR
0 Kudos
Message 1 of 4
(2,628 Views)

Hi ragil,

 

1. initialize the array to provide elements for all frequencies to be measured.

2. store the array in a shift register

3. replace just the column for the last measurement frequency

You need InitArray, a loop with a shift register and ReplaceArrayElements…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,627 Views)

In addition, I would recommend that you keep the data in rows instead of columns. Now the elements for each new experiment are adjacent in memory. You can always transpose it for saving later.

0 Kudos
Message 3 of 4
(2,606 Views)

Hi.. 

I did same as you told and implemented in my program layout. But still it is not giving proper output.

Vi attached please let me know the mistake.

 

Thanks in advance

IamAKR
0 Kudos
Message 4 of 4
(2,573 Views)