LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I erase a polar plot after some data has been plotted and then plot some new data?

I' m having problems with the polar plot, what I want to do is plot some data from 0 to 180 degrees this data is plotted in points and all these points must be shown in the graph until 180 degrees then I want to erase this data to plot some new from 180 degrees to 0. Any ideas?

 

 

I've enclosed my vi

 

Download All
0 Kudos
Message 1 of 5
(3,169 Views)

You are a beginner in LabVIEW, the VI which you show does not make too much sense. I recommend you to take some tutorials, and you will get more understanding about basics like data flow, data types, loops, etc...

Here you find resources:

 

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

 

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training

 

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

I think the point that Blokk was making refers to your illogical use of the nested For loops.  Think about what you want to do, what loops you want to make (and what loop variables you want).  It's not a bad idea to write down, in text form (also sometimes called "pseudo-code") what you want to do ("Generate an array of 360 data points using such-and-such a function having this-and-that format.  Plot them all on a so-and-so plot.  Wait until the Cows come Home, and do it again until the Stop button is pushed").  Once you have it clearly (?!?) stated, you can begin to see what is repeated (multiple plots until Stop pressed, and within each plot, generating 360 points) and when various things (waiting until the Cows come home, generating a point, plotting something) need to occur.

 

Bob Schor 

0 Kudos
Message 3 of 5
(3,124 Views)

I didn't look at the code you posted, but here's something I did a while ago that just plots measurements every degree on a 180 polar plot. It uses a random number for the value plotted, but you could replace this with your own value. Feel free to modify and post a more efficient way of doign this. It's saved in LabVIEW 2014. By the way, it uses the OpenG Data Changed VI so you'll have to install that package if you haven't alredy.

0 Kudos
Message 4 of 5
(3,108 Views)

A radar plot always starts with a clean slate (or whatever picture you wire from the left, which you don't!).

 

Some code comments (some things have been mentioned already):

  • Your inner FOR loop iterates once and this just acts as a glorified "buitl array" due to autoindexing. Remove it!
  • Your outer FOR loop runs 361 times, create an array with a single point to be plotted in the radar plot. Nothing from previous interations is retained anywhere. After 351 x 10ms, you see the last point.
  • With every iteration of the outer loop you get the same draw area size, set the same  properties. etc. that's a lot of repetitive and unecessary work. All you need is generate the 361 points and draw the polar plot after the outer loop has completed. If you want to erase the plot, write an empty data array to it. If you want to graph new data, just generate a new cluster array.
0 Kudos
Message 5 of 5
(3,106 Views)