Hi, this is a little complex, so bear with me... I have a test system that tests a number of parts at the same time. The experiment I do consists of measuring a number of properties of the parts at various temperatures and voltages. I want to save all the measured data in a 4-dimensional array. The indices represent, respectively, temperature, voltage, part, property.
The way the experiment is done, I first do a loop in temperature, then in voltage, then switch the part. At this point, I measure all the properties for that condition and part and want to add them as a 1D array to the 4D array. At the same time, I want to make a multiple plot (on an XY graph) of one selected property and part (using two pull-down selectors near the XY graph) vs. voltage. (The reason I need to use an XY graph and not a waveform graph, which would be easier, is that I do not have equidistant steps in voltage, although all the voltage values I step through are the same for all cases). The multiple plots are the data sets at different temperatures. I would like to draw connection lines between the points as a guide to the eye. I also want the plot to be updated in the innermost for loop in real time as the data are measured. I have a VI working using nested loops as described above and passing the 4D array through shift registers, starting with an array of the right dimensions initialized by zeroes. I know in advance how many times all the loops have to be executed, and I use the ReplaceArraySubset function to add the measured properties each time. I then use IndexArray with the part and property index terminals wired to extract the 2D array containing the data I want to plot. After some transformation to combine these data with an array of the voltage values in the form required to pass to the XYGraph control, I get my plot. The problem is: During program execution, when only partial data is available, all the zero elements in the array do not allow the graph to autoscale properly, and the lines between the points make little sense when they jump to zero. Here is how I think the problem could be solved: 1. Start with an empty array and have the array grow gradually as the elements are measured. I tried to implement this using Insert Into Array. Unfortunately, this VI is not as flexible as the Replace Array Subset, and does not allow me to add a 1D array to a 4D array. One other option would be to use the Build Array, but I could not figure out if this is usable in this case. 2. The second option would be to extract only the already measured data points from the 4D array and pass them to the graph 3. Keep track of the min. and max. values (only when they are different from zero) and manually reset the graph Y axis scale each time. Option 3 is doable, but more work for me..... Option 2: I first tried to use Array Subset, but this always returns an array of the same dimensionality of the input array. It seems to be very difficult, but maybe not impossible, to make this work by using Index Array first followed by Array Subset. Option 3 seems easier. Ideally, I would like option 1, but I cannot figure out how to achieve this. Your help is appreciated, thanks in advance! -- germ Remove "nospam" to reply
