LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

More than on index input is wired

i need to generate an array 2D, why appears that error?

 

pregunta.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

thanks in advance

0 Kudos
Message 1 of 10
(3,112 Views)

What exactly are you trying to do?

That looks way more complicated than it should be.

Cory K
0 Kudos
Message 2 of 10
(3,109 Views)
I have an array 1D in wich the data are storage , but a need create an array 2D to storage that data
0 Kudos
Message 3 of 10
(3,105 Views)

Instead of using a sequence structure and several local variables,

why dont you just use 'build array' wired to a shift register.

This will build your 1D arrays into a 2D array.

Cory K
0 Kudos
Message 4 of 10
(3,095 Views)
Since it sounds like you already have a 1D array, just use Reshape Array function.
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 5 of 10
(3,092 Views)

Are you just trying to initialize a MxN array of empty strings?

Cory K
0 Kudos
Message 6 of 10
(3,090 Views)

If you just need to initialize a 2D array, then your code is way, way, way too Rube Goldberg. You can use the Initialize Array function to directly create a 2D array or simply use a block diagram constant if you want a blank array. You could also dynamically create the 2D array as mentioned with the Build Array and you append the 1D data.

 

I would suggest you take some of the basic LabVIEW tutorials.

0 Kudos
Message 7 of 10
(3,088 Views)

Hi kashfer,

 

I hope your well today and thanks for the post.


You've had some good advise - here is an image. 

 

2D.JPG

 

I have to admit though - Rube Goldberg certainly. 

 

I hope this helps, and have you spoken to your local sales office about LabVIEW training?

Message Edited by Hillman on 06-17-2009 04:17 PM
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 8 of 10
(3,081 Views)

kashfer wrote:

i need to generate an array 2D, why appears that error?


This is code is extremely convoluted and wrong. You seem to have a 1x1 subset with a single element that you want to insert.

All you probably need is "initialize array" with that single element (obtained via "index array", not "array subset"!), and the final

dimensions wired. No loops needed.

 

With every iteration, you reinitalize the "5" array back to a size 0x0 array, throwing away anything you did in previous iterations!

Except at the first iteration, you will try to insert into an index that does not even exist in the 2D array, an impossible operation.

 

Can you attach your code so we can have a look at the entire context?

 

Here's seemingly equivalent code:

 

Message Edited by altenbach on 06-17-2009 08:25 AM
0 Kudos
Message 9 of 10
(3,079 Views)

Hi,

 

Instead of array subset, you probably need index array. The output of array subset is also an array (although there is only one element) not a scalar. By the way, your vi is overly complicated and may not do what you want. If you need to convert a 1-D array to a 2-D array, try reshape array function. Good luck.

0 Kudos
Message 10 of 10
(3,070 Views)