LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX 3D Graphs slowing down loop

I have a rather large VI to record data from 4 USB DAQ boards, perform kinematic calculation on the data, and plot real time 3D graphs of the system.  I need the program to run at 30 hertz and this is done except when the graphs are displayed on the screen.  If I move to a section of the VI that doesn't have any graphs, it runs fine.  Is there anything I can do to fix this problem?
0 Kudos
Message 1 of 14
(4,511 Views)

 A lot really depends on how much data must be visible at any given time. If you can play games with decimating the data to reduce the number of points being drawn (and redrawn), you might  be able to get some performance gains. You might also consider putting the plotting in its own thread and passing data to it via a queue. It would be important to monitor the number of elements in the queue to be certain the plotter thread isn't falling behind.

Another thing that may work if you don't need cursors and the other features of the 3D graphics is to use the picture control. I believe that if you run the picture control through a shift register (for example), the control doesn't have to redraw every point it only adds the point to be drawn to the existing picture.  

The problem you are running up against is that there is no hardware acceleration of graphics in LabVIEW. Everything is plotted by the software, so the only way to have high perfromance graphics is to have higher performance CPUs or reduce the amount of data being shown.

Chris
Chris
Practical Physics, LLC
www.practicalphysicsllc.com
0 Kudos
Message 2 of 14
(4,503 Views)
There is hardware acceleration available and it can be accessed through a property node of the ActiveX 3D Graph.  I have attached a picture of the property node.

-Nathan
0 Kudos
Message 3 of 14
(4,434 Views)

According to this thread:

Tips for tweaking graphics hardware acceleration of Mesa & the mesa.dll implementation on Win32 plat... using the property node will not help because the foundation of the ActiveX graphics in LabVIEW, Mesa, does not support hardware acceleration on Win32.

 

Chris
Practical Physics, LLC
www.practicalphysicsllc.com
0 Kudos
Message 4 of 14
(4,430 Views)


PPLLC a écrit: According to this thread: Tips for tweaking graphics hardware acceleration of Mesa & the mesa.dll implementation on Win32 plat... using the property node will not help because the foundation of the ActiveX graphics in LabVIEW, Mesa, does not support hardware acceleration on Win32.

Playing with the 3D graph shows clearly that hardware acceleration is indeed supported (although partially only : try with the attached vi and use the window task manager to look at processor use). This does not means that the plot can be updated at a rate compatible with the above 30 Hz exigences, but that once created, it can be manipulated without overloading the central processor. In LV 8.2 the 3D picture control can make full usage of harware acceleration but lacks the tools to create graph scales.

As proposed by PPLLC in his first reply, the best solution is to use separate loops for data acquisition and display, exchanging data using a queue.

Chilly Charly    (aka CC)
Message 5 of 14
(4,423 Views)
The ActiveX 3D graph does support hardware acceleration as does the 3D picture control rendered into the scene window.  The 3D controls on the front panel such as knobs, booleans, etc do not support hardware acceleration.

-Nathan

0 Kudos
Message 6 of 14
(4,404 Views)

Nathan,

Thank you for the information you have been providing both online and offline. I guess the real question at the end of the day is what will it take to get the ActiveX 3D plots to a point where we see a performance gain from hardware acceleration in 'real time'? By real time I mean as the data set is being acquired an amount of data may be buffered with data being added to the buffer and the entire buffer being displayed. I have seen the behavior that chilly charlie was referencing where once I have the data set acquired I can display it with little to no impact on the CPU, however, in a growing number of applications my customers are expecting to see 4 dimensional data being constructed as the data is acquired.  

Is there something we as developers should be doing to take better advantage of the existing hardware acceleration to improve performance when displaying live data?

 

Chris
Practical Physics, LLC
www.practicalphysicsllc.com
Message 7 of 14
(4,379 Views)

Nathan,

you are hooked : we will not let you go before a fair reply is given to PPLLC question ! 🙂

Chilly Charly    (aka CC)
Message 8 of 14
(4,366 Views)
All,
     I have been looking into your question and in turn have some questions for you:

What type of data are you acquiring, and how is it represented (double, U8, etc.)
What rate are your acquiring data at?
If in continuous mode, what is your "number of samples"?
Is it Software or Hardware timed? HW is the best because it puts less strain on the processor
Please tell me more about your display method: are you displaying a 10 second window of data that updates every 0.1s or displaying all the data you have from the beginning of the acquisition, or doing it a different way?
How many data points are in each set of data?
Is is possible to leave some out of the display and still meet your customer's expectations?
What sort of video cards are you using? 
Does your customer have a similar setup?

Feel free to post a simple VI that shows how you implement your Data Acquisition and display.

-Nathan



0 Kudos
Message 9 of 14
(4,337 Views)

Nathan,

Sorry for the long delay in responding. I am working on putting together 2 example VIs to demonstrate the 2 cases I deal with regularly.

Chris

Chris
Practical Physics, LLC
www.practicalphysicsllc.com
0 Kudos
Message 10 of 14
(4,288 Views)