LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Optimizing Waveform Draws

Solved!
Go to solution

Hello, I'm currently building a heart rate monitor that uses Labview to plot twelve seprate data plots in real time and I'm having trouble with the rate at which I can get the waveform charts I'm using to refresh. They seem to be jittery or jumpy, not smoothly adding plots from one sample to another. I am plotting at a pretty high rate but the refresh rate went up drastically when I stacked plots together, resulting in four waveform charts handling 3 plots each rather than 12 seperate waveform charts. This makes me think it has more to do with how many waveform objects I have rather than how much data I'm plotting.

I have tried using defer panel updates but they just slow my code down even more. Also the rest of my code seems to run lightning fast.

Thanks!

0 Kudos
Message 1 of 10
(3,809 Views)

Dear jlawrence6809,

 

just for sure, check the "Screen Display' section under the following link:

https://www.ni.com/docs/en-US/bundle/labview/page/vi-execution-speed.html

 

Cheers, M

0 Kudos
Message 2 of 10
(3,772 Views)

Thanks ghighuphu that was useful information. I figured that it had to do with how frequently I was requesting draws. I tried the program on a windows pc with a good graphics card (im using a mac air) and that made a world of difference.

I wish there was a way to stack plots both horizontally and vertically in a waveform chart so that only one call to update the chart would be sufficient. 

 

I have another problem if you could answer it though. I am attempting to tie all of the zooms of the graphs together and am making multiple calls to y.minimum and y.maxium for each of my charts, however only the last plot in the stack of each chart is obeying the command. Does this problem seem familiar to you?

0 Kudos
Message 3 of 10
(3,752 Views)
Solution
Accepted by topic author jlawrence6809

Dear  jlawrence6809,

 

I wonder, what is the way you are updating the axes? (see attachment, pls)

 

Cheers

0 Kudos
Message 4 of 10
(3,734 Views)

Oh boy I feel stupid I didn't even see that. Thanks!

0 Kudos
Message 5 of 10
(3,725 Views)

Maybe this belongs in another post but since you here helping me I will ask another question if you don't mind. Hopefully its a simple fix!

 

When I plot on my charts I am getting funny results, there are three things wrong. The first is if you look at the screen shot I attached there are blank gaps in the grid on the left side of my sweep chart. The second is the x axis scale on some of the plots does not seem to clear before redrawing, making a smeared scale. The third is that the grid lines themselves never seem to draw quite right; at certain zooms they do not print at all (eg: the major grid lines should be square on these plots, but they only draw every other one). Is there an easy way to fix these things or are they bugs? Thanks!

0 Kudos
Message 6 of 10
(3,721 Views)
Dear jlawrence6809,

I am not sure, what you mean by "blank gaps in the grid on the left side of the sweep chart" -- maybe a screenshot with a highlighted area could help us.

2) You are running your VI in continuous mode and so plotting new values to the waveform charts, aren't you? Then I cannot imagine a smeared x-axis.

3) again, a running minimal example/video may help us.

p.s. Please remember to accept any solutions and give kudos, Thanks
0 Kudos
Message 7 of 10
(3,709 Views)
0 Kudos
Message 8 of 10
(3,690 Views)

Dear jlawrence6809,

 

I am sorry, I have no clue, how to get rid of the white spaces on the left or the smeared x-axis. I have never experienced anything like that. Also, I am not using iOS, so I could not possibly test that. I hope you receive some ideas from others.

 

Cheers

 

p.s. Please remember to accept any solutions and give kudos, thank you!

0 Kudos
Message 9 of 10
(3,654 Views)

Do the waveform charts behave the same way when you've only got one or two on your front panel?

How many do you have to add before the graphics start acting unusual?

What is the rate that you're writing to these charts?

Can you create a simplified version of your program that doesn't have external dependencies, or does this issue only occur when you use the external dependencies? (We cannot run your code to verify/recreate the problem)

 

The more information you can provide, the better!

 

Nathan Murphy
0 Kudos
Message 10 of 10
(3,601 Views)