LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How I do a 3D surface graph with a history ? There's my vi.

Well, I forgot to put my questions in my last message so here it is!

In my project, I'll be receiving some datas from the serial port. I need to stack all the information and display it on a 3d surface graph. The thing is, I receive correctly each line of datas, display it on the graph, but I only see the last line of data received. I tried several things to keep the history of it but unsuccessfully. I attached my VI in my last message so if any one wants to check it or give me some hints or advice about that it would be appreciated.

thank you very much!
0 Kudos
Message 2 of 5
(3,049 Views)
You need a shift register around your loop that's reading the data so that you append that iteration's data to the previous set of data, and plot the corresponding cumulative data.

That said, there's a few "peculiarities" with your VI:
  • You have 3 while loops and 1 for-loop. One of the while loops only runs once. The while loop that's reading the data is set to run forever. No way to stop it other than pressing the Abort button on the toolbar. This is not a good way to stop.
  • You seem to be trying to make a timed for-loop. Perhaps you want the Timed Loop structure?
  • In the while loop that's running just once you're generating a sine waveform, but sending the data to a slider that will only display the last value. Smiley Surprised
Other comments:
  • You should not be constantly closing the VISA reference. Close it at the end of your program.
  • You don't need to have that big long constant inside the while loop. That just causes the while loop to stretch out. Just place it outstide and tunnel it in. You can even resize the string constant. Smiley Wink
  • In your loop that's running just once you don't need to use the "Convert From Dynamic Data" in order to do the comparison function. Just wire the waveform wire to the upper node of the comparison function, right-click on the comparison function and select "Comparison Mode -> Compare Agreggates".
0 Kudos
Message 3 of 5
(3,032 Views)

THis sounds like using a unique plot for each update would be an effective way of doing what you described.

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 5
(3,012 Views)

Thank you very much guys you help was very good !

Smiley Very Happy

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