From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving columns of one array

Solved!
Go to solution

Hi everybody,

 

In four firsts columns i've value of voltage and last four columns i've the date of acquisition. I need to move position of columns. The drawing below shows how it should be the final position of the array.

 

Thanks.

Download All
0 Kudos
Message 1 of 6
(3,009 Views)

@Carlos1987 wrote:

Hi everybody,

 

In first four columns I have value of voltage and last four columns I have the date of acquisition. I need to move position of columns. The drawing below shows how it should be the final position of the array.

 

Thanks.


Selectively use the array manipulation functions to break apart the array and rebuild the columns in the order you want.

 

Index Array, Build Array,

Delete from Array, Insert into Array,

and also Array Subset can all be used.

 

There are a number of ways to do it.  I would use Array Subset to get the different sections, and then use Build Array to put them back together.

0 Kudos
Message 2 of 6
(2,997 Views)
Solution
Accepted by topic author Carlos1987

Hi Carlos,

 

I've taken a look at your VI and I think the solution to the problem is the first snippet.  But then again I was thinking why you do it that way.  So I programmed it differently and that is shown in the second VI.  The second one should be a lot better then the first one.  Probably not even the best way to do it, but it's programmed in 5 secs 😉

 

WrongWayBetterWay

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 3 of 6
(2,978 Views)

What's the purpose of the 0ms wait in the innermost loop???

0 Kudos
Message 4 of 6
(2,976 Views)

Hi Altenbach,

 

No idea - has no use at all - but I kept it in there 😉

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 5 of 6
(2,971 Views)

This my mistake. SorrySmiley Happy

0 Kudos
Message 6 of 6
(2,941 Views)