08-19-2010 10:56 AM
I have an array of cluster that has a boolean inside. I need to set on/off of the boolean once at the begining of the case and once after the case executes. This will signal which sequence is running. So i need to strip out that index value, change it and reinsert it back. The problem is this isn't changing the boolean value.
Solved! Go to Solution.
08-19-2010 11:05 AM
Could you please attach your code instead of images so we can see whats going on?
08-19-2010 11:11 AM
How can you say it does not work when you don't even have the output wired to anything?
Much better if you attached your code but I did reproduce your cluster array and everything works just fine.
08-19-2010 11:15 AM
Hello,
Based on the png file is looks like you are using Index Array instead of Delete Array Subset.
Enclosed is an example, probably not the most "proper way" to do it, but a way that works for sure.
Give it a look over and see if that is what is going on.
Good Luck!
08-19-2010 11:21 AM
Drewski, I knew it was something simple I was missing.
Thanks
08-19-2010 11:23 AM
Hi,
Make sure before running the VI, you have initialized the array with some default value. suppose if you are usisng insert into array or replace array subset function, it won't work if you have empty array.Find the attached example it working fine and replacing array value.
08-19-2010 11:26 AM
The solution is somewhat rube golberg code. Absolutely no reason to do a delete and insert. Just do a replace array.
08-19-2010 12:07 PM
I was thinking about the index -> replace verse the delete -> insert schemes and decided that if the cluster contains a great deal of data, then the delete -> insert would use less memory. My current understanding is that index array returns a copy of the array element, not a reference to the array element.
Not that memory usage is crucial in every instance, it just occured to me that there might be an instance when the delete->insert would be, perhaps, a better choice than index->replace.
rube-goldbergesque, hee hee, good one.
08-24-2010 09:27 AM