LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform chart falls behind current time

I'm running into an issue with my waveform charts where they fall behind the current time. I don't know if it's a formatting issue or what, but the way I have it set up is all the data I want to display writes to the charts every second (see the two screenshots - first is the while loop that writes to the charts, second is the subVI which pulls the data to be written to the charts). I tried both a Wait ms and Wait Till Next ms Multiple function in the while loop and they both produce the same results, but I think that Wait Till Multiple is the proper function to use here.

rseabeck_0-1641829610235.png

rseabeck_1-1641829651808.png

 

In the next picture you can see what I'm talking about with it falling behind the current time. There's also a stretch of the chart that is empty which I know if from the chart history length not being set right - pretend that's not there, I'll fix it when I'm not in the middle of a run.

 

rseabeck_2-1641829799833.png

 

I've compared this to how my coworkers have set up similar charts, and there's nothing I notice that's different between their code and mine, so I imagine it has to do with the chart properties which I show below:

 

rseabeck_3-1641830144186.png

rseabeck_4-1641830174284.png

rseabeck_5-1641830220661.png

 

Any advice? Am I messing up something simple? Thanks!

 

 

 

 

0 Kudos
Message 1 of 9
(1,743 Views)
Turn on Autoscale for the X-axis
Message 2 of 9
(1,730 Views)

I'm not even seeing where you are telling the chart what time to use.  I generally turn my data points into a waveform data type, which includes a timestamp of the data point.  Give this nugget a good read: Sporadic Waveform Chart 


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 3 of 9
(1,721 Views)

@crossrulz wrote:

I'm not even seeing where you are telling the chart what time to use. 


I don't see it either, but if you whip up a quick test with the merge signals node, you can convert the dynamic data to waveform data. This does have time stamp info in it, so my guess is that it gets added at the merge signals node.

0 Kudos
Message 4 of 9
(1,700 Views)

@Gregory wrote:

@crossrulz wrote:

I'm not even seeing where you are telling the chart what time to use. 


I don't see it either, but if you whip up a quick test with the merge signals node, you can convert the dynamic data to waveform data. This does have time stamp info in it, so my guess is that it gets added at the merge signals node.


Well, I learned something today.  Not sure it will be useful though since I do not trust the Dynamic Data Type.


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
Message 5 of 9
(1,693 Views)

@crossrulz wrote:

I'm not even seeing where you are telling the chart what time to use.  I generally turn my data points into a waveform data type, which includes a timestamp of the data point.  Give this nugget a good read: Sporadic Waveform Chart 


My understanding of waveform charts was that they generate the timestamp on their own when a data point is written to the chart, and waveform graphs require the timestamp to be included. Am I mistaken here? Even the example VI provided in LabVIEW there's no timestamp data being passed to the waveform charts.

rseabeck_1-1641842554058.png

 

This is what the code looks like that my coworker wrote to do the same thing on an older version of this test stand. It works flawlessly and doesn't fall behind. It's basically the same as my code just not as tidy:

 

rseabeck_0-1641842187128.png

 

0 Kudos
Message 6 of 9
(1,691 Views)

@Gregory wrote:
Turn on Autoscale for the X-axis

Looking at my coworker's code, and he did select autoscale. I'll give that a shot.

0 Kudos
Message 7 of 9
(1,690 Views)
Just as an aside, many LabVIEW users do not like dynamic data. It hides too much of what is going on. One of the huge strengths of LabVIEW is that you get error checking at edit time. This means if you connect a wire source and sink that don't match, you'll see a broken wire. Using dynamic data allows you to shove square pegs into circular holes. Some would call this an advantage, but most consider this a disadvantage.
0 Kudos
Message 8 of 9
(1,664 Views)

@Gregory wrote:
Turn on Autoscale for the X-axis

Sorry to take the solution back. I thought it did it, but after letting the code run a little longer the chart fell behind again even after turning on autoscale.

 

Seems like I may be striking out here - I think I'll reach out to tech support and see if they can provide any guidance. Thanks again for your suggestion though!

0 Kudos
Message 9 of 9
(1,583 Views)