LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto index only shows partial data

Solved!
Go to solution

Hi Jeff,

 

I can't open your attachments.  It says 'file version is later than the current labview version'. I'm using Labview 2012.

 

I fixed it using altenbach's suggestion but I'd still like to see what you did.

 

Thanks.

0 Kudos
Message 21 of 53
(1,124 Views)

Why don't you just use the Plot Visibility Checkbox for the plots?  Right-click on the chart's legend and select Visible Items->Plot Visibility Checkbox.  That will elminate the need for the clusters and the last set of FOR loops.

 

Since you are only plotting a set run, use a graph instead of a chart.  A chart is meant to keep a history in its display.  If you just want to show the data from this file, then use a graph.

 

You can get really far with a few Array Subsets and (possible) Transpose 2D Array instead of the Index Array with FOR loops and Build Arrays.

 

And since you are just reading the file once, there is no need for that huge While loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 22 of 53
(1,124 Views)

Back Saved for 2012 (Sorry about that)

 

No option to stack plots in a graph.  Or I would have gone there myself

 

Do pay attention to the chart's "Transpose" property and note the index array can slice columns or rows

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 23 of 53
(1,110 Views)

@crossrulz: I can definitely see the advantage of using the plot visibility checkbox.  It'll simplify my code but after trying it I remember why I'm using buttons.  When you use the plot visibility checkbox feature, the entire plot disappears when you uncheck a box but with buttons, the plot continues but new data stops going to the chart so you could click and unclick the buttons and it would show those gaps on the graph.  The reason I'm using a chart is because I'm using dummy data at the moment.  This VI is actually going to be used with real-time data so I think a chart would be better for that, right?  Also, I was using transpose 2D array before but altenbach suggesetd that I use autoindexing for loops around my build array nodes which simplied the code. 

 

Also, the reason for the while loop is because I want to continuously check for new data.  I want it to refresh and show new data every half second or so.

 

 

0 Kudos
Message 24 of 53
(1,107 Views)

Thanks Jeff but I don't understand why you're using the history property.  How is that better than sending the data to a chart?  Can you please explain what you did?  

0 Kudos
Message 25 of 53
(1,104 Views)

@rhupd wrote:

 Also, I was using transpose 2D array before but altenbach suggeseted that I use autoindexing for loops around my build array nodes which simplied the code. 

 

 


You must have misread something!

 

For the constant data wiring the chart history simplifies validating the code-  switch it back when you have live data.


"Should be" isn't "Is" -Jay
0 Kudos
Message 26 of 53
(1,103 Views)

Sorry, I think was using transpose for a matrix, not the one for arrays.  Maybe I misunderstood what he said....I have to go back and read it again.  It was helpful though; helped me tidy things up.

 

0 Kudos
Message 27 of 53
(1,096 Views)

@JÞB wrote:

@rhupd wrote:

 Also, I was using transpose 2D array before but altenbach suggeseted that I use autoindexing for loops around my build array nodes which simplied the code. 

 

 


You must have misread something!

 

For the constant data wiring the chart history simplifies validating the code-  switch it back when you have live data.


It depends if you want to merge the original arrays as columns or rows when building the 2D array. In the scenario here, a FOR loop around "built array" is equivalent to using a plain build array followed by a transpose. No matter how we process it later, we need the correct arrangement.

 

I don't understand your chart history stuff either. How would that help validating?

0 Kudos
Message 28 of 53
(1,080 Views)

Of course everything can be done in one loop stack (note that the boolean array autoindexins on the inner loop).

 

For exampe this code fragment works just fine.

 

0 Kudos
Message 29 of 53
(1,073 Views)
Solution
Accepted by topic author rhupd

Here's how the entire thing would look like. Seems to work just fine.

 

 

0 Kudos
Message 30 of 53
(1,061 Views)