12-02-2009 01:50 PM
Hi,
I should preface this by saying I've only been using LabVIEW for a few weeks now, so my question may seem elementary. I wrote a program that takes a "mean" value (which I can control on the front panel) and then inserts it into one of three arrays (I created three different arrays using a case structure). However, I can't figure out how to auto-index the elements as they are added to the arrays. Right now, when I click the boolean to send the mean value into one of my three arrays, it always overrides the first value. I know I can wire in an index control into my "replace array subset" function, but I can't figure out how to wire in something in a value that increments each time I click the boolean. Perhaps I need to fundamentally change the structure of my program? Thanks.
12-02-2009 02:08 PM
First, you would get better results posting in the general LabVIEW forum instead of the Vision forum. Your question has nothing to do with Vision.
It isn't really clear exactly what your final goal is. Do you just want to increment a value and display it? Where do the arrays come into this?
My suggestion would be to store the arrays using shift registers, then modify them as needed. Right now, you are starting over with a four zero array everytime.
Another improvement would be to use an event structure instead of a bunch of nested case statements.
Bruce