From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-20-2011 08:01 AM
Hello all
I am new to Labview so I apologise for the newbie question.
I am using Labview to check off parts in an assembly as a precursor to a test. For my "checklist" I create an array of clusters, with the cluster containing a string for the part number and a boolean to show if it has been scanned. I read in my parts list and then I would like to add in the part name to each cluster in the array. I do not want to make multiple copies of the array if possible. The code shown below does not work - I previously had the "Array" (my checklist) on the outside of the while loop, as I assumed the inplace elements box would not need an output. The cluster created in the inplace elements is correct, but the "Array" does not change.
Any help woud be appreciated, I would prefer a simpler solution to the inplace elements if possible (again without making multiple copies).
Regards
Ray
Solved! Go to Solution.
10-20-2011 08:12 AM - edited 10-20-2011 08:13 AM
You don't show the rest of the code, but I'm guessing that your "Array" is never actually initialized with any values. Thus, the "replace" cannot work since you cannot replace an element that doesn't exist. If the case you are showing is intended to be the actual initialization of the array (and based on what you are saying it seems as if that's the case), then ditch the inplace element structure. All you need to do is to autoindex from your string array and just do this:
10-20-2011 09:38 AM
10-20-2011 10:07 AM - edited 10-20-2011 10:08 AM
That still won't work if the incoming array is empty.
I had also considered the shift register, and should have mentioned it, but the post is somewhat confusing in that it implies the case we are looking at is where the array is supposed to be created. If the array is actually being initialized with "dummy" values someplace else, then, yes, a shift register would do the trick. But if it's not, then nothing would "change". Basically, does the OP mean "initialized" by the word "change", or "alteration of initial values".
10-20-2011 10:25 AM
10-20-2011 10:46 AM
10-21-2011 03:16 AM
Thanks for the prompt replies.
I had not initialised the array correctly and using the code above sorted it out.
Thanks