<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to insert cluster in to array element in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328111#M975995</link>
    <description>&lt;P&gt;Hi stephen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;repeat after me: "&lt;STRONG&gt;I can only replace existing array elements!&lt;/STRONG&gt;" &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You initialize the "task info array" with just one (1) element. This first (and only) element will get index zero (0).&lt;/P&gt;&lt;P&gt;And you still wonder why you only can change parameters in this single array element? Really? After all the explanations before?&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2016 10:47:43 GMT</pubDate>
    <dc:creator>GerdW</dc:creator>
    <dc:date>2016-07-28T10:47:43Z</dc:date>
    <item>
      <title>Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327716#M975861</link>
      <description>&lt;P&gt;Hi, I have an experiment which need macro data to be saved and I am currently trying to store all this in a cluster which itself will contain clusters and arrays. I have an array of clusters with in a cluster and i want to update the cluster. the code below shows how i do that. basically i pick out the array, index it to get a ref to the cluster, write values and then insert cluster back to the array index. but it doesn't work. Its such a simple problem I'm a little stumped. Any feedback would be great.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 15:59:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327716#M975861</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-27T15:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327721#M975862</link>
      <description>&lt;P&gt;There's missing typedefs. Do Save As -&amp;gt; duplicate hierarchy and upload a zip of that folder instead.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 16:04:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327721#M975862</guid>
      <dc:creator>ijustlovemath</dc:creator>
      <dc:date>2016-07-27T16:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327728#M975865</link>
      <description>&lt;P&gt;You can only replace elements if they exist. That is, if the element you are replacing is empty, it will still be empty after you use the replace function. Try initializing your array first.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, no need to unbundle the items in your cluster that are not being used/modified.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 16:08:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327728#M975865</guid>
      <dc:creator>Gregory</dc:creator>
      <dc:date>2016-07-27T16:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327729#M975866</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi Stephen,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;after getting rid of all those missing typedefinitions I could run your VI and it worked as expected (I think so)…&lt;/FONT&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;FONT size="2" color="#FF0000"&gt;but it doesn't work. Any feedback would be great.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Well, saying "it does not work" is a bad error description. It's a very bad description. Enough feedback? &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;FONT size="2"&gt;&lt;FONT color="#FF0000"&gt;i pick out the array, index it to get a ref to the cluster, write values and then insert cluster back to the array index.&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Does the element you want to index even exist? You cannot replace non-existing array elements!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 16:10:22 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327729#M975866</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2016-07-27T16:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327732#M975869</link>
      <description>&lt;P&gt;To edit an existing array element, you need to put it back using "replace array subset". You are using "insert into array, which would grow the array by one element, leaving the old data intact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a look at the "in place element structure", it can simplify some of your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(there is no need to attach the typedef, we can just disconnect from it).&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 16:16:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3327732#M975869</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2016-07-27T16:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328079#M975980</link>
      <description>&lt;P&gt;By doesn't work I mean that the element that i wish to be inserted into the index does not go. Also the array element may be both populated and not. I need to write it the first time but then may need to update it in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:25:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328079#M975980</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-28T09:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328084#M975983</link>
      <description>&lt;P&gt;The program worked when the index is 0 but then when i increase it to 1 or higher the element in index 0 will revert to default and so is the element in the index i selected. I need this aray to be 4 element in length and then write to each element depending on what experiment has been run.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding initialising the array how would i do this? The array is part of a type def cluster and so I dont know were I would use the initialise array function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also I have attached the vi where the type defs shoudl work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:33:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328084#M975983</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-28T09:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328089#M975985</link>
      <description>&lt;P&gt;Hi Stephen,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;Regarding initialising the array how would i do this?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;You use InitArray to create an array of 4 ("inner") clusters. Then you use BundleByName to write this array into your main/"outer" cluster…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:47:55 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328089#M975985</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2016-07-28T09:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328093#M975987</link>
      <description>&lt;P&gt;When I use the replace array subset this doesn't work either. I will look into the in place elemnet structure you suggested though but I've never come across this so it is all new to me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:50:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328093#M975987</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-28T09:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328100#M975990</link>
      <description>&lt;P&gt;Okay,&amp;nbsp;I'm not understanding this. I have already initialised the array in the the type def when I made it, haven't I? &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 10:10:09 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328100#M975990</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-28T10:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328104#M975991</link>
      <description>&lt;P&gt;Hi stephen,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;I have already initialised the array in the the type def when I made it, haven't I? &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;No you don't. You only defined a datatype, but not the value of the datatype!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 10:36:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328104#M975991</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2016-07-28T10:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328108#M975994</link>
      <description>&lt;P&gt;okay so I did this, still didn't work. Only when the index was 0 did were values updated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 10:41:36 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328108#M975994</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-28T10:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328111#M975995</link>
      <description>&lt;P&gt;Hi stephen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;repeat after me: "&lt;STRONG&gt;I can only replace existing array elements!&lt;/STRONG&gt;" &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You initialize the "task info array" with just one (1) element. This first (and only) element will get index zero (0).&lt;/P&gt;&lt;P&gt;And you still wonder why you only can change parameters in this single array element? Really? After all the explanations before?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 10:47:43 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328111#M975995</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2016-07-28T10:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328116#M976000</link>
      <description>&lt;P&gt;I thought the initialise dimension input was for 1D, 2D, 3D etc. not the amount of elements I want to initalise. Anyway that half works, as it reinitialises everytime the VI is called but I'll put that code higher up and hopefully it will work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 10:53:51 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328116#M976000</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-28T10:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328128#M976003</link>
      <description>&lt;P&gt;Hi stephen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;I thought the initialise dimension input was for 1D, 2D, 3D etc. not the amount of elements I want to initalise.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;When you are unsure about how the function works you should read the LabVIEW help for that function! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;as it reinitialises everytime the VI is called but I'll put that code higher up and hopefully it will work.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Yes, as the initialization is part of this VI. Usually you only initialize once at program start…&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 11:09:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328128#M976003</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2016-07-28T11:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328866#M976250</link>
      <description>&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;When you are unsure about how the function works you should read the LabVIEW help for that function!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I would normally check if I was unsure but to be honest its a rather misleading terminal name. Should be called number of elements or size of dimension. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your help anyway &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 29 Jul 2016 13:51:22 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328866#M976250</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-29T13:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328887#M976258</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/339163"&gt;@Stephen1995&lt;/a&gt; wrote:&lt;P&gt;I would normally check if I was unsure but to be honest its a rather misleading terminal name. Should be called number of elements or size of dimension. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://zone.ni.com/reference/en-XX/help/371361M-01/glang/initialize_array/" target="_blank"&gt;According to the help&lt;/A&gt;, the terminals is called (&lt;STRONG&gt;dimension size ...&lt;/STRONG&gt;), so the focus is on the "size" in each dimension, i.e. exactly what you are suggesting. No action needed. ;).&lt;/P&gt;&lt;P&gt;The number of dimensions is given by the number of size inputs you expose by resizing the node. So for a 2D array you would expose two size terminals. Wiring numbers will now determine the size in each dimension and the product of the sizes will determine the total number of elements.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 14:17:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328887#M976258</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2016-07-29T14:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328895#M976262</link>
      <description>&lt;P&gt;Misleading never the less. Maybe once you know the nuance its obvious but until then it isn't as clear as it could be.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 14:23:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328895#M976262</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-29T14:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328898#M976265</link>
      <description>&lt;P&gt;Pretty clear to me.&amp;nbsp; If it was what you were thinking, then it would be called "Number of dimensions".&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 14:25:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328898#M976265</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2016-07-29T14:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to insert cluster in to array element</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328905#M976269</link>
      <description>&lt;P&gt;Going by your profile you have 10 years experience. I would hope it is clear by now. For new user however things aren't as simple, as you should&amp;nbsp;know if you think back a little.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 14:30:30 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Unable-to-insert-cluster-in-to-array-element/m-p/3328905#M976269</guid>
      <dc:creator>Stephen1995</dc:creator>
      <dc:date>2016-07-29T14:30:30Z</dc:date>
    </item>
  </channel>
</rss>

