I have a program that parses out a string into an array of values (a mixed bag of strings, integers and booleans). I run this program several times to get values for several sets of variables. I'm trying to present the collection of arrays on one front panel in a sort of summary pane. I created a front panel with several arrays of controls to represent my data. The arrays are vertical so that each run is visually on a single line and across that "line" is a numerical indicator, a boolean indicator, a string indicator, etc.
The thing I can't figure out right now is how to replace a single value in that array without overwriting the rest of the values. For example, if I want to refresh the values for the second "row", I don't know how to go to the second item of each of those vertical arrays and set the values without overwriting the first value in each array. I don't particularly want to do a refresh of every single item every time.
Is there a way to read the established values from the arrays? Or make a control both a control and an indicator? I'm in 2011--so I don't think that an xcontrol is an option.
Thanks to everyone.
I'm looking at that right now. I still need to provide an initial array--which will overwrite my destination array. In Java, there is not the idea of indicators and controls--so I would read the array back into a model or reference and then write my changes and put it back out there. Perhaps there is that capability in Labview?
Are you using an array of clusters (structures) to hold your mixed data types? If so, you can use the in place element structure to index the array, then a "bundle by name" node to just access the single cluster element you want and upate that element.
WIthout seeing how your data structure is set up, people here will just be guessing. You mention having mixed data types, but you can't really have a mixed type array. That's why I'm assuming you have an array of clusters, but I'm just taking my best guess.
My apologies for being unclear.
I have to call an external command that returns a group of results. I call this multiple times to navigate through several scenarios.
1 (integer) , 1 (representing a boolean), 3.223x
1 (integer), 0 (representing a boolean), 1bac3
9 (integer), 1 (boolean) , xdyd
I have a front panel that I have 3 vertical arrays of controls:
Array0 Array1 Array2 Array3
Button1 integer1 boolean1 string1
Button2 integer2 boolean2 string2
Button3 integer3 boolean3 string3
I want to have the user be able to refresh a single line of data by hitting the button at the beginning of the line--at which point he will get back the integer, boolean, string, etc for that line.
Arrays 1 - 3 are arrays of indicators. If I try to use Replace Array Subset, I have to feed in an initial array--which I cannot do with an array of indicators. If I change it to controls (which I don't want to do because I don't want the user to overwrite the values manually--I want them to use my buttons to call the external commands), then I can't write to the values.
Is there a way to call for a reference or something to get the values and build the array, edit it and then dump it back?
I'm sorry--I don't have Labview on this machine and can't further illustrate it.
Thank you again.
Something like this? Gets the current value, then updates just the boolean of index 2 in the array.