LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

polar plot ...

Hi,

I am new to labview. I have a txt file with two columns with first column for magnitude and the other for the corresponing angle in degrees. How do I plot this in polar cordinates using labview 7 ?
0 Kudos
Message 1 of 5
(2,175 Views)

Hi arun_001,

first you should open the txt file, there is a function called something like "read from text file" in the Function palette (I'm not sure if it is exactly named like this in English, I'm using the German LabVIEW version. It should be located in Programming > File I/O).

This function can read each line from the txt file when using a loop and returns the wanted text line as a string. Put then each of the strings read into an array.

The array data with magnitude and angle will be the input for function "polar plot" which displays the plot on the front panel (Programming > Audio&Graphics > Plots > polar plot. You can also open the Function Palette, use the search option and type "polar").

It is also described in the LV Help which data types you need and where to find the functions. Be aware that the polar plot function is not available in the LV Base Edition.

Regards,

gedi

Regards,
gedi
0 Kudos
Message 2 of 5
(2,158 Views)
Hi arun & gedi,

it#s even easier to read in the full text at once (set length to -1, default parameter...) and use "spreadsheet string to array" to convert the text into an array of numbers!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(2,149 Views)
Hi Gedi and GerdW,

I managed to pull the data from the file and plot it. Thank you both for the tips.

I am using DAQassistant to store data from a rotary sensor (voltage and time) to a txt file. Instead of storing all the data sampled at 1 KHz, I  want to store if the angular increments (say 2 degrees).  How do I  check  for a condition say an increase in 0.2 V if the data is received dynamically and then store that particular set of data? I tried express comparission function but its output is a boolean and could not manage to pass the data through comparrision loop.

Arun.
0 Kudos
Message 4 of 5
(2,132 Views)
Hi arun,

it seems you're missing some LabView basics! The first 4 items are for free!

You need a loop with a shift register. Now you can compare the actual reading with a reading from last iteration. When the change is big enough you may write the new value to a file... You don't need an express vi to do a simple comparison Smiley Wink




Message Edited by GerdW on 03-11-2008 08:39 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(2,124 Views)