LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building a dynamic array or live 3D plot

Solved!
Go to solution

I am trying to build a dynamic 3D graph system with information flowing in from a serial port. For example, to plot something like a live topographic map with live GPS coordinate and digital elevation. The longitude and the latitude are the XY of the graph and the elevation will be Z. Currently the parameters have been isolated into 3 distinct DBL values. They are then indexed into 3 different arrays and fed into a 3D plot VI. I have set the process so that a while loop is in encompassing the isolation processes and an auto-indexing tunnel at the exit of the while loop. The problem with this setup is that the indexed array is only send at the end of the while loop, thus end of the process, which prevent live plotting of the data. Is there anyway, I can get around that?

 

Thank you!

0 Kudos
Message 1 of 7
(4,778 Views)
Solution
Accepted by topic author yue87

Use a Shift Register to store the data and update the data set (using build array) INSIDE the loop. (Note: Don't le tthe array grow without bounds since it will eventually kill performance).

 

I have done something very similar to show air speed vectors in 3-space.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 7
(4,774 Views)

Hi Ben,

 

Thank you very much for your help. Great! it's really similar to your air speed project.

However, I am fairly new to labview and still unfamiliar with shift register.

I have attached what I try to do so far, and I know it's flawed.

Would it be possible to give me an example of how to setup the process?

 

Much appreciated.

0 Kudos
Message 3 of 7
(4,762 Views)

No example to offer but I may have a suggestion that can help.

 

If you click on the "light bulb" while the code is running you can see what data flows where and when.

 

If you watch your code, I think you will see that the 3D plot should be updated INSIDE the inner loop.

 

POst more images if you still have trouble. At first it may seem like a strange ritualistic dance trying to get the code wired up, but if you watch the message in the help window and get acquainted with the "Data Flow Paradigm" it will become easier.

 

Quick request:

 

When you get this working, I'd like to see the images. I like 3D plots.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 7
(4,748 Views)

Great that makes a whole lot more sense! I used a feedback node instead for esthetic purposes and it worked like a charm.

Unfortunately right now, I don't have the device yet. I am stuck with a small amout of sample data, thus you are going to see a relatively small graph.

But like you said, I can see it killing the performance as it gets bigger.

Thank you Ben!

 

Download All
Message 5 of 7
(4,742 Views)

So, I what would you do if you wanted to do this for large sets of data?  I too am stuck with the shift register method but I really want to know how to do it right/better.  Actually, I'm only w

0 Kudos
Message 6 of 7
(4,519 Views)

I too would like to make a continuously updating graph, but I need to use fairly large sets of data.  What is a better way to do this avoiding the shiftregister kill-performance?


Thanks,
Tal

0 Kudos
Message 7 of 7
(4,518 Views)