LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to replace an array in a cluster

Solved!
Go to solution

I have a 1-D array of a type definition with a cluster of 5 elements. One of the elements is an array that I want to replace. Can anyone help me understand how to do that?

 

Thank you.

0 Kudos
Message 1 of 7
(3,256 Views)

Hi,

 

So you have a 5 elements cluster, and one of the element is an array, which is what you would like to replaced? 

 

Feed that cluster into bundle by name and feed in the new array. 

 

Yik

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 2 of 7
(3,252 Views)
In my attached VI in my first message I tried to do I believe what you're suggesting and it didn't work.
0 Kudos
Message 3 of 7
(3,242 Views)
Solution
Accepted by topic author chuck72352
It would work better if you used the same data type. You have a numeric array in the cluster and you are trying to replace it with a string array.
Message 4 of 7
(3,224 Views)

You're missing a lot of VI's and controls.  So it is difficult to tell exactly what you are doing.

 

Are you getting an error?  I see an error due to mismatched datatypes where you are trying to feed an array of strings into an array of U8's.

 

You are also going through a song and dance of converting your 1-D array of clusters into a cluster, then later converting that cluster back into an array.

 

You need to index out an element of your 1-D array of clusters, replace the cluster element that is a 1-D array of U8's with another 1-D array of U8's using the bundle by name, then use the replace array subset to get that element back into your array.

 

Are you sure you really need as complicated of a data structure as your are trying to use?

 

 

Message Edited by Ravens Fan on 03-27-2010 10:27 PM
Message 5 of 7
(3,220 Views)
Thank you!
0 Kudos
Message 6 of 7
(3,219 Views)
The "ncWriteNetmult" function requires the data structure I'm trying to use. It is part of the nican library.
0 Kudos
Message 7 of 7
(3,217 Views)