Polar plot from excel
I have some data in the form of an excel table with two columns
(frequency and amplitude). I wish to plot this as a polar plot in
labview and then carry out convolution/correlation with another set of
data. How do I achieve this seemingly herculean task?
Look at this example file. Labview has a built-in polar chart.
C:\Program Files\National Instruments\LabVIEW 7.0\examples\picture\demos.llb\Polar Plot Demo.vi
Similar Messages
-
Problem using read from spreadsheet file and polar plotting
Hi to all labview users,
i am a beginner in labview and i am trying to do a polar plot.
i read the polar plotting example in labview and it was straightforward.
I used "write to spreadsheet file" to gather data.
and they are in the following format
13 10
4 20
8 30
....etc
now. i tried using "read from spreadfile" to get the data into a array, then using "array to cluster" to convert the array into cluster, so i could connect it to the polar plot block
however, it kept saying i couldnt connect that way, because polar plot uses 1-d array with cluster of 2 element and my source is a cluster of 9 elements....
but doesnt the "read from spreadfile" block give me a 1-d array? and where does that 9 come from? i only have 3 rows and 2 columns in my data file....
any guidance would be greatly appreciated.
thx alot
Happy guy
~ currently final year undergraduate in Electrical Engr. Graduating soon! Yes!
~ currently looking for jobs : any position related to engineering, labview, programming, tech support would be great.
~ humber learner of LabVIEW lvl: beginner-intermediateHelllo,
I've made an example to try to help you with that question.
Notes:
- the file must have values separeted by tab
- reading the values from file as you mentioned using "read from spreadfile" you'll get a 2D array and not 1D;
Software developer
www.mcm-electronics.com
PS: Don't forget to rate a good anwser ; )
Currently using Labview 2011
PORTUGAL
Attachments:
Read Table and plot polar graph.vi 26 KB
teste.txt 1 KB -
How can I change the Y-axis (circular) grid spacing, in Polar Plot VI?
When using Polar Plot VI, I need more control over the plotting parameters. This means tweaking the sub-VIs in various ways. What I need to do most is make the polar magnitude axis less busy, i.e. only draw circles every 10 instead of every 5 divisions, when using a range of 0 (outermost) to -80 (innermost).
The magic 'magnitude axis subdivisions' variable seems to be generated in Calc Scale Specs sub-VI, and output as an array of clusters, but I can't quite see how it's created and from what.
Please can anyone help me gain control over the number of magnitude division circles generated?
Many thanks!I think if you go inside the Calc Increment.vi and modify the Increment output terminal it might change what you want to see. Try putting a multiply by 5 or ten into the case structure for when the log is false.
Attachments:
polar plot calc increment.jpg 90 KB
modify calc increment.jpg 104 KB -
Hello,
I need some help. I have data in excel The first column is a timestamp and the other columns are the data needed.and I am trying to get a graph with multiple plots with these data.
attached here are the excel file and a labview file. In the labview file, the top part is an example I got from the forum, an interesting graph I am trying to follow.
The bottow part is my tentative to extract the data from excel into array and try to use it. but I am stuck here. Any help please!
Thank you,
Agyna
Attachments:
graph.vi 13 KB
Histo.xlsx 53 KBHi agyna,
I've saved xls file into csv and then i'm reading into labview and plotting the graph. Please check it this is what you need.
Thanks
uday,
Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
Certified LabVIEW Associate Developer (CLAD) Using LV13
Attachments:
graph.vi 18 KB -
Import from Excel to Project - blanks cells are having dates automatically added
Hi. I'm very new to Project but have started setting up a Roadmap using it which is working fairly well so far, although have hit one snag.
I have data in Excel: it is a list of projects with 4 columns containing the dates of various stages (planning, initiate, execute, close). I have created a reusable map so this can be imported into Project and the Gantt chart to show pre-defined markers
on the timeline for each stage on each project row. All well and good so far.
However, not all of the projects in Excel have all of their dates defined. E.g. a project might not yet have a close date. But when this is imported into Project a date gets applied for it. I have no idea why!
How do i get the import into Project to allow any blank cells from Excel to remain as blank so that nothing is plotted on the Gantt chart for that particular section?Thanks for both of your replies. I have tried this and the same issue occurs. I have checked each row in the imported Project data and they are all showing as set to 'manually selected' yet at some point in the import Project is adding data to blank cells.
I have retried using a simple test excel sheet and when this too is mapped into Project, any blank cells get populated with the date that appeared in the preceding row for some reason:
I can then go through and manually delete this cell in Project (which then replaces it with an "NA") - but if i have to manually do this whenever importing from Excel into Project then it makes it very time consuming.
Surely there must be a way for Project to not auto-populate blank cells? Or am i missing something fundamental? -
Colour in area underneath a curve on a polar plot
Hi i have made a VI that shows a curve on a line, i have also made a vi that outputs a mpeg video of the graph panning through all of its values, what i was wondering was if it was possible to fill in the area within a curve? I've managed to set the line colour, but i am unable to find anywhere that lets you set area colour.
Many thanks.
John P.
VI attatched, bits cluttered, but the polar plot is clearly visable at the center.
Attachments:
Cosine Lobe Model.vi 98 KBVery nice unclebump,
You get 5 stars for that one To help people new with LabVIEW I decided to attach a picture showing you where to navigate to make the change. You need to change the logic constant from false to true in the Polar Plot Data.vi (Labeled Polar Data) under the Polar Plot.vi (No Label just a picture of a polar plot). The plot comes out filled because it is a multiple line graph drawn in a picture node with the line fill option on.
Regards,
-SS
Message Edited by ShotSimon on 08-27-2008 09:25 AM
Attachments:
Polar Filled.PNG 50 KB -
Polar plot of a data matrix....help is needed
Hello,
I'm working on an Ultrasound project, the data coming from the device is transmitted through a USB driver to the PC. I made a VI, that open a connection with the USB device and recieve the data. The coming data are recognized by the LabVIEW as stream of strings, so, i converted the data into a bytes using "string to byte array" function, then I used the function "reshape array" to reshape the data bytes into a 512x64 matrix which represents the no. of samples per ultrasound line times the no. of ultrasound lines.
I plotted the data on an intensity graph function and it worked, but the problem is that the data or the matrix must be plotted as a polar plot, not as a cartesian plot.
The problem is that I want to convert each single pixel (byte) of the (512x64) matrix from having (x,y) coordinate into a pixel that has (r, angle) coordinate.
can you help me plot these data in a polar plot. If any body has any suggestions please help.
best regards,
Underzero.
Attachments:
US_VI1.PNG 17 KBMultiple posts: keep discussion to this thread: http://forums.ni.com/ni/board/message?board.id=170&thread.id=337220
-
Sending arrays from Excel into Labview
I want to send an array from Excel VBA into a LabView VI.
The Excel example shows how to send individual numbers and return an array into Excel but not send an array.
Everything tried sends blank arrays into LabView, which can then be modified in LabView and returned to Excel.
A VBA code snippit that does not work is:
Sub LoadData()
' LoadData Macro
' Keyboard Shortcut: Ctrl+l
' This is an example to demonstrate LabVIEW's Active-X server capabilities.
' Executing this macro loads a LabVIEW supplied example VI "Frequency Response.vi",
' runs it and plots the result on an Excel Chart.
Dim lvapp As LabVIEW.Application
Dim vi As LabVIEW.VirtualInstrument
Dim paramNames(0)
Dim paramVals As Variant
Set lvapp = CreateObject("LabVIEW.Application")
viPath = lvapp.ApplicationDirectory + "\examples\apps\freqresp.llb\DAK Frequency Response.vi"
Set vi = lvapp.GetVIReference(viPath) 'Load the vi into memory
vi.FPWinOpen = True 'Open front panel
paramNames(0) = "Foo"
paramVals = Sheet1.Range("j1:j1000").Value
Call vi.Call(paramNames, paramVals)
This code generates an error - expecting 1D array or variants.
However, if I supply the correct array, then LabView thinks it is empty
'foo' is a cluster
'Array' is a double array
Neither work to receive the dataThanks for the reply but that approach will be difficult. The problem to solve is relatively simple IF LabView could read arrays (it writes arrays easily). Here is the problem:
I want to convolute two large arrays. I have written VBA programs to do this but they take too long - over 30 sec whereas the LabView version take <1 sec IF I could get the data into LabView.
The convolute is part of an optimization program that goes though many loops so that it takes hours to run efficiently AND if I manually change cells in the spreadsheet, then it takes 30sec to come back as VBA does not respect clean cells (for some reason).
I was trying to write a function in VBA to do this calculation via LabView rather than VBA. One way to do this is to write a text file in VBA and read in LabView, then pass the results back or maybe the clipboard as a buffer. That is faster but clumsy. You could also have LabView look for dirty cells and then do the calculation as the server rather than the client. Again, time consuming and cumbersome. I have written pure LabView code to do the curve fitting but prefer to use Excel as that is easier to incorporate and work with the data. You can do convolute using FFTs but Excel does not do that correctly - they CANNOT make their FFTs into a function (VBA functions cannot modify cells in the spreadsheet but only return variables. FFT modifies cells so cannot be called from a function, only a macro, which then needs to be updated manually). Again, I can kluge VBA (real kluge this time) to make FFTs work as a function BUT prefer the LabView solution, if possible, as I am not sure the FFT will actually save time.
I am not sure if the problem is LabView's fault or Excel's (2013) fault that the variables are not set-up properly. LabView claims to be able to do this. Again, you can pass single variables into LabView and read back arrays but try as I might, I cannot get arrays into LabView.
Any help in sending arrays (maybe Labview expects a variant variable and needs to convert it somehow) would be appreciated. Variants are suppose to be able to be converted automatically but maybe there is a bug in LabView (2010) that does not handle input variant arrays correctly (I have tried making them clusters, double arrays, ect). LabView thinks that all the arrays sent by VBA are empty. If LabView modifies the same array, VBA sees that modification so that the addresses appear to be sent correctly i.e. the array "handle" is being sent to LabView or else it could not fill the array to send back to VBA.
If ever this is solved, I will put on-line the solution for others as again marrying both programs will have advantages. Others may find this interesting is marry LabView with Excel so that LabView does some of the heavy calculations that Excel has kluged. -
How to clear polar plot Programmatically
How to clear polar plot Programmatically, thanks!
This doesn't technically clear the plot, it's writing an array of zeroes to it. But if all you want is to make the plot appear to dissapear that's ok.
I've taken a closer look and found that you have to use the Erase First property node to set which pictures can be erased. The default is never erase any, which is why the plot doesn't clear.
Then, you can get an empty picture constant from the pictures sub-pallet and wire that into the Value (Signalling) property node and it will work.
I have attached one VI with and one without the event structure to tidy things up, but you may not have the event structure available to you. I wrote these in LV2012.
Attachments:
PolarPlotV1.vi 16 KB
PolarPlotV2.vi 22 KB -
Polar plot..gives a straight line
hello
i use labview 7.1
i have connected a polar plot vi....done all the connection as per the example vi
but i dont get the plot
i plotted from -180 to 180
i dont get the plot properly..
my magnitude values varies from -39 to -40
can any one help me..Please attach your code so we can see where the problem is. Thanks!
LabVIEW Champion . Do more with less code and in less time . -
Polar plot for antenna measurement
Hi,
I have LabVIEW 8.2 (Full) and I could make a polar plot in LabVIEW from the 'Polar Plot.vi'. However, I realized that I don't have the option to use 'Create Annotation' on the front panel to get the value of certain point of interest on the plot itself (since the plot itself is a picture). My point of interest is -3dB from the peak of the plot, and is there anyway to extract the corresponding information from the polar plot? Eg, peak point is -20dB, my point of interest would be -23dB, and I would like to retrieve the angle of -23dB.
Attachments:
polar.vi 32 KBI must have attached the old file. I did use the 'Array Max & Min.vi' to look for the highest point in dB, and then get the corresponding angle. From the max point, I subtracted 3dB and obtained the -3dB point, but there is no corresponding value for the -3dB point. Eg: -20dB is the highest peak, -23dB is the point of interest, and there is not -23dB in my data set. In other words, I might have -22dB, -22.5dB, -23.3dB etc
I am assuming that the 'Polar Plot.vi' will connect all those points together and form the polar picture. And I would like to obtain the -23dB angle from the plot.
Attachments:
Polar 2.vi 35 KB
antenna.xls 9 KB -
Polar plot scale numbers "truncated"
I have a strange problem when using the polar plot VI.
Labview 2012 latest SP, running on a cRIO9074. I'm running a servo motor for one revolution while measuring the runout on an armature using a linear position sensor.
The data looks good, but for some reason, the scale labels truncate after two decimals, no matter what I set the precision to. I'm sending it a cluster of two double precision arrays.
When I run the Labview example, it works fine I can change the number of decimals viewed to 10 if I need to. I've tried keeping everything the same as the example.
Any ideas?
See picture.
The sample VI works fine, (I can set the precision to 6 and I will see 6 decimal positions. )Thanks for the response, Kurt. With the help of a colleague, we were able to determine that this behavior is only when the VI is running on the cRIO.
(I think it was called "Polar Plot Demo.vi", but yes the VI is "Polar Plot with Points Option.vi"
We verified this by running the example vi first from windows (works fine), then ran it on the cRIO. On the cRIO it truncates decimals depending upon what font size you use. If you use a REAL TINY font, it will include more decimals. When running in Windows, the graph appears to move left to accomodate for more decimal place. When running on the cRIO, it appears to cut the picture off on the right side.
Following is our setup, but as stated above, we sent the demo program to the cRIO (didn't use any I/O) and the problem occured.
We're using Labview 2012, latest updates applied.
Modules are:
NI-9411 to read an Ono Sokki position sensor (quadature output from two channels, resolution is .0001 mm.
Ethercat set up using the "getting started" manual for the NI supplied AKD servo drive and motor.
All hardware works fine and data collected looks good. Test is to turn motor and collect servo position and linear encoder position.
Data has 4 decimal places coming in. -
Hi 2 all,
Can anyone please send me the complete steps for uploading of data from excel to BI??
Also tell me that when we use DSO or when we use infocube? and if we design query in query designer then we use info cube fields or DSO fields??
Please respond.
Regards,
Aisha Ishrat
ICI Pakistan Ltd.Hi,
there is no separate Tcode for 3.5 environment... but in RSA1 itself they give 3.X functionality also.. So, if you want to follow the 3.5 procedure you can go thru that... in the Infosource tab--> select your info area -->and right clcik it.. ->in that create INFOSOURCE 3.X.. for that just right clcik ur CUBE or DSO and --> Additional functions --> Update Rules.. and like that you can follow the same procedure which you done in 3.5..
and for data loading in BI 7.0 from fla file means
fisrt create one Cube or DSO with the same structure which you have in flatfile..
and activate it..
->now comes to Datasource tab> create one Datasource here you need to select type of data for example.. select Transactional data --> and menntion your flatfile name in extraction tab- and file type and eneter your info object names in FIELDS tab --> and load preview data Activate it..
now select your datasource and create info package and schedule it.. now your data will loded in to PSA level...
> and now comes to info provider select your cube.. and right clcik it.. and create transformations.,. and activate it..
> and create DTP -- Activate it.. and Execute it..
1)Create datasource. Here u can set/check the Soucre System fields.
2)Create Transformation for that datasource. (no more update rules/transfer rules)
2.1) While creating transformation for DS it will ask you for data target name, so just assign where u want to update ur data.
DataSource -> Transformation -> (DTP)-->Data Target
Now if you want to load data into data target from Source System Datasource:
1) Create infopackage for that data source. If you are creating infopackage for new datasources, it will only allow you update upto PSA, all other options u can see as disabled.
2)Now Create DTP (Data Transfer Process) for that data source.
3) NOw schdule the Infopackage, once the data is loaded to PSA, you can execute your DTP which will load data to data target.
Data Transfer Process (DTP) is now used to load data using the dataflow created by the Transformation. Here's how the DTP data load works:
1) Load InfoPackage
2) Data gets loaded into PSA (hence why PSA only is selected)
3) DTP gets "executed"
4) Data gets loaded from PSA into the data target once the DTP has executed
1) Create a data source
RSA1->Source Systems->FILE(File)->PC_FILE(Filesourcesystem)->Create Application Component(optional)-Create Data source
2) Create the data provider
3) Create Transformation
Right click on the data provider, choose 'create transformation' and choose your data source (give relevant data source and its type)
Just connect the relavant fields between your data source and data provider.
4) Create DTP
Then Double click on the DTP node created under yous transformations. choose the extraction mode
5) Load the data: there are 2 ways:
you can run the infopackage and DTP separately or create a process chain consisting of these infopackage and DTP and run.
Also check /people/sankar.kumar/blog/2006/10/11/loading-text-filestxt-into-bw-with-hex-option for hex option
Thanks,
Sankar M -
I am having trouble printing to an Epson XP600. We have replaced the printer and we are still having the same problem. When I try to print from Excel, only the color prints. Any suggestions?
Has anyone else had issues not being able to print black (such as a document)? My photos print great, but when I try to print a simple black-ink document, it won't work. Any suggestions?
-
Can anyone help please.
I would like to send a range from excel 2011 by email using VBA code. I can do this with Outlook but It fails because of using the Mac Mail Client.
Is there any code out there that will send via the mac mail client
Regards
GaryHave you tried zipping Outlook application, and quitting Excel and reopening it? Perhaps if there is no Outlook, it will go to the default e-mail client.
Maybe you are looking for
-
I have just imported a new roll into iPhoto5 (~160 pics / ~4MB each) and wanted to export just this roll for sharing. The photos import okay and display okay in thumbnail view and slideshow. However, when I try to export (select last roll and then sh
-
Unsure of syntax for SQL SELECT statement, please help
I am trying to execute the following SQL statement: ResultSet rs = stB.executeQuery("SELECT quantity FROM stocklevels WHERE code=salesCode[x]");where SalesCode is an integer array and x is a counter used to loop this part of the code. I keep getting
-
ITSmobile standalone - F8 logoff doesn't work
Hi, in our ITSmobile standalone scenario the logoff doesn't work. It is also not working in the ITS webgui transactions using the standard logoff button. It is a ITS 6.20 standalone SP64, with a 4.70 SP65. Many things regarding logoff only work for i
-
I have a new computer now with windows 8. Old one was windows 7. The itunes library contains all I expect on new computer. Ipod will not sync with content. It says it is syncing but only picks up 1 tune. Solution please. I am on itunes 64 but it make
-
My iMac will NOT turn on. I've done everything. Disconnected power cord for a couple days, and it didn't work after trying to start it up. Took out all things connected to it - mouse, keyboard, printer, iPod, internet cord. WHen i press the power but