LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto index only shows partial data

Solved!
Go to solution

Sorry about the file name.  I'll change the version every time I attach it.

 

  • The multiplier needs to be set only once and since you graph 4 points every 250ms dt should be 1/16 of a second, right? (you have a problem that 4 points arrive at the same time every 250ms, but maybe you can ignore that... I cannot make that decision) How do you know that I'm graphing 4 points/250ms?  Is it because I have 4 charts?
  • Since the X scale format never changes, you don't need to write that property, ever. Got rid of this.  Can't even remember why I did it in the first place!
  • The X offset is the time of the first point of the chart. It needs to be written only once at the start of the program. None of your property nodes belong inside the loop.  Also got rid of 3 of them and put it outside the loop but when it's outside, it isn't executed.
  • Why do you get the time 4 times in parallel? Do you expect four different results? Once is enough! You can branch the wire, right?  What do you mean by this?  4 times in parallel?  Which wire should I branch?
Download All
0 Kudos
Message 41 of 53
(1,321 Views)

 


@rhupd wrote:
  • How do you know that I'm graphing 4 points/250ms?  Is it because I have 4 charts?

Because you add four points per iteration and the loop delay is 250ms, making the loop itereate four times/second.


rhupd wrote:
  • Also got rid of 3 of them and put it outside the loop but when it's outside, it isn't executed.

Of course it is executed. Exactly once at the start of the program.


rhupd wrote:
  • Why do you get the time 4 times in parallel? Do you expect four different results? Once is enough! You can branch the wire, right?  What do you mean by this?  4 times in parallel?  Which wire should I branch?

You have four instances of "Get Date/Time in seconds", then you convert all to dbl and wire each ouput to one of the property nodes. All you needs is get the time once, convert it to DBL once, then branch that wire to all places where it is needed. Compare the picture.

 

 

Message 42 of 53
(1,301 Views)

The x-axis on my first graph only shows one minute at a time which is too small but the other 3 graphs show about 17 minutes which is too big.  I still don't understand how to fix this.  I tried to right-click on the chart, went to properties and scales and tried changing the minimum and maximum but I can't seem to save the changes.  As soon as I press ok, the settings go back to what they were.

 

Also, why aren't the axes following the system time?  When I execute the VI, the time on the left side starts by matching the system but within a few seconds, it's several minutes ahead.  I added a note next to the graph.  If I'm working with data which I'm getting in real-time, how can the clock go ahead of the system time?

Download All
0 Kudos
Message 43 of 53
(1,277 Views)

Yor first two charts have a history of 500 points while the others have a history of 1024 points. For the same dt, they will retain a different length.

 

So:

  • Set the dt to 1/16 to make it correct
  • set the history lenght to the same size for all charts
  • autoscale x for all charts. This way all show the same number of points.
  • I would also probably change the format of the axis.
  • Don't set the min and max of the axis, it will interfere with the rest of the axis settings. Just leave it at autoscaling. (The min should be t0 as coded and the max should be [t0 + history size x dt] Note that once you run out of history buffer, the min and max will shift up with each added point as this is the reasonable behavior.
Message 44 of 53
(1,266 Views)

I'm going through all your points and I'll post an updated version soon but I need to clarify something before I can go any further: what's dt?  

0 Kudos
Message 45 of 53
(1,260 Views)

@rhupd wrote:

 what's dt?  


xscale.multipler. i.e. the time increment between adjacent points.

0 Kudos
Message 46 of 53
(1,256 Views)

Thank you so much altenbach!  It's finally doing exactly what I'd like.  I'm almost done.  Is there a way I could change the dt while the VI is running or do I need to change the number before executing it?

Download All
0 Kudos
Message 47 of 53
(1,237 Views)

dt is a global parameter and applies to the entire chart. If you change it part way through the acquisition, you probably get undesired results.

0 Kudos
Message 48 of 53
(1,226 Views)

Hi altenbach,

 

Is it possible for the first point on the x-axis to be stationary?  E.g. if the system time is 11am when I execute the VI, can the first point stay at 11am until 30 minutes worth of data has been collected?   The x-axis plot on the far right will change with the system time.  I made some notes in the file....sorry if it's confusing.  I did my best to explain it.

 

Thanks!

Download All
0 Kudos
Message 49 of 53
(1,187 Views)

If the x-axis is set to autoscale, the first marker will remain at the start time until your run out of history buffer, at which time it will start incrementing to show the time of the oldest point in the buffer.

 

If you want to see 30 minutes worth of data. You simply need to calculate the required history buffer size based on the chart update rate. Simple math!

0 Kudos
Message 50 of 53
(1,180 Views)