From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Graph Help Needed (Continuous)

Hi everyone,

 

To start, I am attaching my VI below.

 

So when I am running my VI, the graph updates every N samples. Let's say I set "Samples per loop" to 10000 and the "sample rate" to 1000, the graphs will update every 10 seconds, and the x is a 10 seconds frame. I want the graphs to be continuously updating and x (t) will increase all the time. I think I know exactly what is wrong with it, but I just can't figure out a way to fix it (beginner with LabVIEW). I think the graph only execute when the loops have finished with all the samples. 

 

Can anyone please help with this? Thank you guys.

0 Kudos
Message 1 of 6
(3,421 Views)

Maybe use a chart instead of a graph?

0 Kudos
Message 2 of 6
(3,408 Views)

Hi,

 

Thank you for replying. I have tried that, but it doesn't solve the problem of updating every 10 seconds. I understand that the 10 seconds time frame is the result of the multiple between "samples per loop" and "sample rate". So that I am wondering if I need to do something with the loop, or somehow put the graph on the outside of the loop so the data will be plotted in real time.

0 Kudos
Message 3 of 6
(3,402 Views)

sorry, I don't have daqmx installed, so a lot of your code is broken for me. Shouldn't you use "mean ptbypt". in the inner for loops. (Your loops run too many times anyway).

 

When does that event actually fire (as I said it is broken for me). Why do you even need an event structure? How much data are you trying to graph (history cannot be infinite because you don't have infinite memory).

0 Kudos
Message 4 of 6
(3,395 Views)

If I can be honest, I don't even know I am using an event structure. I started building the VI on the basis of a voltage input example VI, which had the event structure. Everything worked for me and I have successfully run tests with this VI multiple times, the data came out fine. I am just trying to optimize it for better live data streaming on the graphs (since it updates too slowly).

 

As for the "mean" function, I have actually changed the averaging part to a "mean" function, I just accidentally attached the older version of my VI. 

 

Could you please suggest a alternative way to do this?

 

Thank you very much!

0 Kudos
Message 5 of 6
(3,392 Views)

By the way, since I only have the basic version, I don't have "mean ptbypt". I can only use "mean" instead. Do you think I should take out the for loops completely?

 

Thank you.

0 Kudos
Message 6 of 6
(3,387 Views)