LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Weird Timing In Chart

Solved!
Go to solution

Hi there,

 

I'm trying to take data from a CDAQ card (which I'm simulating). It's an RTD, so I take the raw resistance and put it through an equation to get the actual temp values. I'm not sure if that is correct right now, but that's not a big problem.

 

The problem is that i'm trying to add multiple charts together so I can view multiple RTD temperature at one time. I have a single chart showing the output data, but when I put it into the chart showing the same data twice, something get's messed up.

 

I'm polling the data 100 times a second, so I have a scaling factor in the multiple chart of 0.01, and I have the offset in as the absolute time. When I run the VI I can see the time scale on the charts are not equal. I think the multiple chart is running about 2 times as fast. I'm not exactly sure where I've gone wrong here, but I sense there's a better way of doing what I'm doing.

 

Any help would be great.

 

Thanks.

0 Kudos
Message 1 of 5
(2,703 Views)

One of your charts gets timing embedded in the waveform datatype. What's the dt there? It will get lost once you only retain the y data as you do for the second chart

 

I also don't understand why you are constantly readjusting x0 (X scale offset) in one of the graphs based on the current time. That makes no sense! x0 should remain the same as data is added. Set it once when the loop starts.

Message 2 of 5
(2,698 Views)

I'm pretty new to all this, and i'm figuring it out as I go, so it makes sense that things don't look right. My main question here is how exactly do I pass both the x and y data over to the second chart? I tried to figure it out before all this and hit a brick wall, so I tried what I sent in the first post, and clearly that didn't do the right thing.

 

If you could point me in the right direction that would be great.

0 Kudos
Message 3 of 5
(2,690 Views)
Solution
Accepted by topic author Chris Johnson

If your goal is to have two of the same plot on the second graph, you can pass the waveform data into a Build Array node as both of two inputs. Then you can wire the array into the waveform chart.

 

See here for descriptions of different chart and graph styles:https://www.ni.com/docs/en-US/bundle/labview/page/types-of-graphs-and-charts.html

 

There are several ways to update each different kind of graph.


I'm not entirely sure what your goal is here though. The two plots will be directly on top of each other and will be indistiguishable. 

Message 4 of 5
(2,659 Views)

Thanks, thats what I needed.

 

I'm actually going to be getting two different sets of data eventually, but I just wanted to make sure I could get it working first.

0 Kudos
Message 5 of 5
(2,653 Views)