LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem manipulation aray

Dear all,

i have a small problem manipulating arrays.

I have a 3D array whose Page 0 contains a 2*3 size array.

Now i wish to another row to Page 0. so my array at Page 0 would become 3*3. but its not happening. its only showing d data at first 2 rows and not the 3rd row.

 

 i am attaching my VI to this message. pls have a look at it n let me know the solution.

 

Thanks,

Ritesh

0 Kudos
Message 1 of 6
(2,837 Views)
0 Kudos
Message 2 of 6
(2,836 Views)

Hi Ritesh,

 

You are trying to Replace NOTHING with SOMETHING. What I mean exactly is you are writing (replacing) data to an empty location, whether be it Row/Column/Page, which will not happen at all. Maybe you can use the Insert into Array primitive to achieve what you want to.

 

Moreover, you have wired the Index to Replace Data as the Page Index, not the Row Index. This might also be a problem area.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 3 of 6
(2,826 Views)

HI,

the VI u attached is same as mine.

 

How can i give the row index to the insert function without mentioning the page no. . i want to insert a row to a particular page. which is just not happening. insert function is only accepting single input. either page or row or column.

 

Could you pls a post a VI which will insert a row to a particular page ?

 

Thanks,

Ritesh

0 Kudos
Message 4 of 6
(2,809 Views)
Any Help
0 Kudos
Message 5 of 6
(2,782 Views)

Hi Ritesh,

 

This is copied from LabVIEW Help : 

INSERT INTO ARRAY

This function resizes the array along only one dimension. Therefore, you can wire only one index input. The index you wire determines the dimension along which you can insert. For example, to insert row(s), wire the row index, or to insert column(s), wire the column index.

The array you wire to n or n-1 dim array must be the same dimension or a dimension less than the one you wired to n-dim array. For example, you cannot insert a single element into a 2D array, and you cannot insert a single row (a 1D array) into a 3D array. You can, however, insert a 2D array that has a single row into a 3D array. LabVIEW pads the resulting array as necessary.


So, that is why you cannot give in more then one input in the Insert inot array. I am Attaching a couple of  ways of manipulation and adding the data.

 

Vishal

Applications Engineer

National Instruments

Message Edited by TurboTurtle on 12-19-2008 01:48 AM
Download All
0 Kudos
Message 6 of 6
(2,756 Views)