LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

1D array of 3 waveforms: Why is the bottom chart display & array output missing 2 of the 3 waveforms vs the top display?

I have attached a VI that splits a 1D array of 3 waveforms.  It then subsamples those 3 waveforms & reassembles them for display.  However, the reassembly must be flawed because the bottom display & array indicator only give out the 1st of the 3 waveforms that I split.  What am I doing wrong?
0 Kudos
Message 1 of 2
(2,342 Views)
First, change the action of you stop button to Switch When Released, not Switch until released which forces the user to hold it down to make it stop.  (Also, change it back to a normal color rather than solid black.):smileymad:
 
Your manipulations of the waveform arrays don't make any sense.  Your inner most for loop does nothing for you since it only runs once.  It just indexes out the 3 waveforms and turns them into their own 1-D array of waveforms each with one element.  (Array Subset would do the same thing!)  But where it gets odd is how you are taking the outer loop iteraiton i times the number 9 and using that to index the 3 individual 1-D arrays.  So only on the first iteraiton (where i=0) do you get the zeroeth element of the 1-D arrays where something exists.  The next 9 iteration you get nothing because there are no elements 1 through 9 in each of those 1-D arrays.  So you come out with 3 1-D arrays that have a waveform in element 0, and empty waveforms in 1-9.  Then concatenate them together into a 30 element 1-D waveform array where you have waveforms in elements in 0, 10, and 20, and all the rest of the elements are empty waveforms.
 
For whatever reason, those empty waveforms are messing up that waveform chart.  The other 2 waveforms are actually there, but they show up as white making them virtually invisible.  You can see by the way the grid gets hidden.  If you reshuffle the order of waveforms going into concatenate array making the square wave first, it becomes slightly more obvious.  Why they show up in white, while the legend shows them in color, I don't know.  Perhaps it is a bug.
 
Whatever you mean by "subsamples those 3 waveforms", I don't think you are doing what you think you want.  There is probably a different way of doing it.


Message Edited by Ravens Fan on 08-09-2008 10:07 PM
0 Kudos
Message 2 of 2
(2,341 Views)