LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manipulating 2D arrays

Hello, need some help to make a VI that will modify a 2D array based on information in one column.

For example belowshows original 2D array: 

Command  # # Address Data0 Data1
RD_LONG       0 1 4945 80 -
WR_LONG 3 1 4945 80 -
RD_LONG 3 0 3246 0 -
WR_LONG 3 0 3246 80 -
WR_LONG 3 0 3248 3C -
RD_LONG 3 0 3250 5

5

The modification consists in detecting if  column5 contains valid data. On the above example we see a number 5 on data1 which is a valid digit,  once this is detected a new 2D array must be converted as follow:

Command # # Address Data0 Data1
RD_LONG 0 1 4945 80 -
WR_LONG 3 1 4945 80 -
RD_LONG 3 0 3246 0 -
WR_LONG 3 0 3246 80 -
WR_LONG 3 0 3248 3C -
RD_LONG 3 0 3250 5  
RD_LONG 3 0 3251 5  
         
              

Once valid data was detected, a copy of the row where the condition was met will need to be copied and inserted below,  only incrementing the address number by 1 and passing column 5 Data1 to Data 0 (col4) of in new inserted row.

Any pointers will be greatly appreciated...Thanks!

         
           
           
           
       

 

 

0 Kudos
Message 1 of 2
(2,320 Views)

It is expected that you attempt the problem and post a VI of your work.

 

0 Kudos
Message 2 of 2
(2,300 Views)