LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wiring up the 'Replace Array Subset' VI

I cant get the input or the output array to wire to the VI. I'm not
trying to do anything fancy
so I'm just doing something really dumb, but Ive got inputs for all
the indexes,
and elements, but I always get a broken wire when I try to connect to
the arrays, either
input or output (Ive tried control and indicators arrays (of size 3)
with no luck).

http://i16.tinypic.com/6evxy5x.jpg

By the way, is it possible to use the SAME array for both the input
and output? In otherwords,
ideally I'd like to take an array, modify some element, and put it
back into that same array..
without declaring 2 arrays.

Speaking of possiblity, is it possible to do something like:
http://i17.tinypic.com/54edxde.jpg
(i.e. leave some of the unusued inputs open?)

0 Kudos
Message 1 of 2
(2,601 Views)
For your first question: You're getting the wiring error because your input array has no defined type. You have an empty array on the front panel. In other words, you just have an array container. You need to put something in the array. Select a numeric control from the palette and drop it onto the array container.

For your second question: In general LabVIEW will re-use memory buffers wherever possible. With a replace array you are, by definition, replacing the array. If you're using the input array for some other operation LabVIEW will determine whether it needs to make a copy of the input array.

For your last question: You can leave the index input unwired as that gets autoincremented when you expand the function, but you cannot leave the value input unwired. What would it replace it with? If you only need to replace specific indices, just specify those indices.

General comment: I would suggest reading up on array in the LabVIEW manual and going through the tutorial that comes with LabVIEW.
0 Kudos
Message 2 of 2
(2,593 Views)