LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Live Plotting Intensity Graph

We have app where need to draw 2D data.
We get 2D array (~2500x2500 points), and then draw part of this data like a map or intensity graph (almost full window on HD screen so 1800x800 points).
Wee need make selection and draw frames with legend on this "indicator".
Also we need scroll this map (this is why we get more points than we need)

Intensity graph is "too" slow. In test app to redraw data with 1 frame over it takes ~100ms.
Now we use .NET sollution. .Net control get and draw data itself, and Vi just show this control. But if we go to the Linux, we can't use .NET.

How can we draw this "image". Any ideas?

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

Hi Artem,

 

So your main pain point with using an intensity graph is the time it is taking to redraw the data when you move the graph?

Did you start with an example program like the Intensity Graph and Chart Data Types.vi or did you build your program from scratch?

Is it a requirement that this program work on a Linux system as well?

Adena L.
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 5
(2,793 Views)

Not sure what you mean by "make selection and draw frames with legend " but it seems the timely scrolling of the graph is more the issue.

 

This snippet takes 2500x2500 random numbers and plots them in an intensity graph with a visible XY range of 1800x800 (trying to approximate your conditions).  The scroll bars are handled by the event structure and seem to be much more responsive than 100ms per scroll event.  I made some assumptions in the program as some of the details were not covered by your description.  Does this do what you need with respect to redraw times? 

 

intensity_graph_scroll.png

 

 

If I'm missing the boat, please post your (slow, non .NET) code. 

 

Yes, there are data flow and coercion issues.

0 Kudos
Message 3 of 5
(2,788 Views)

Thank you for reply.
Here my snippet.The data updates some times per second and it looks like river or waterfall. This is simulated by delete and build array.

And user can make selection. In this case the program shows the frame. And frame should swim on river with data. This simulated by Plot image property.

As you can see, the blinking presents and period ~200ms

 

river.png

0 Kudos
Message 4 of 5
(2,778 Views)

This runs at ~10ms on my machine BUT it doesn't do what you want.  

 

intensity_graph_scroll2.png

 

I got rid of a couple shift registers and replaced the "delete from array" with an "array subset".   At that point the loop rate was ~90ms.  I then replaced the plotimages property node with a picture indicator and this brought it down to the 10ms range.  This shows that drawing the frame is not the thing that is taking the time, it is the adding of it to the intensity graph.

 

I tried placing a frame decoration on the front panel and moving it around using property nodes, rather than using a picture to achieve the frame.  This was actually slower than your method (~260ms).

 

I suspect the main issue is essentially "overlapping elements" ("plotimage and data" or "decoration and graph indicator").  I've heard somewhere that one of the more memory-intensive aspects of the front panel is calculating what is actually drawn to the screen when there are multiple indicators in the same location.  Perhaps someone with direct knowledge of this effect will chime in.

 

 

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