01-10-2022 10:16 AM
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.
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.
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:
Any advice? Am I messing up something simple? Thanks!
01-10-2022 11:21 AM
01-10-2022 11:37 AM
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
01-10-2022 01:01 PM
@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.
01-10-2022 01:27 PM
@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.
01-10-2022 01:27 PM
@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.
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:
01-10-2022 01:30 PM
@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.
01-10-2022 03:27 PM
02-17-2022 01:35 PM
@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!