From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-29-2014 03:26 PM
Hello, I would like some suggestions on how to create a 3-D plot from mulitple data files. In my setup I measure a receive antenna using an HP 8510. The transmitter is stationary but the receive antenna is able to be positioned at different angles. For each angle we sweep the receive antenna in the azimuth axis. So for each azimuth sweep I generate a data file, and each new sweep I roll the antenna in the phi direction. I would like some suggestions on how I would write an application where the user could select the multiple data files and then plot the data in a 3-D plot generating an antenna pattern or some call a volumetric plot.
Thanks,
joe
07-30-2014 05:07 PM
Hello
Let me know if I understand this correctly. After some acquisition you will be left with few files, let’s say file 1, file 2, file 3 and file 4.
Then you would like your user to select data from few of these files and plot them on 3D Plot? For example, get data from file 1, 2,4 and plot it on 3D graph…
08-01-2014 08:19 AM
Yes that is exactly what I must do. At the very beginning of the data file there is some header information that has details of the sweep, such as file name and the starting angle and the stop angle of the sweep and then the measured data follows. I thought if I knew how to open up a directory and then select multiple files and click OK the program would then open each file and read the antenna measurement data into an 3-D array and then plot the data in a 3-D plot.If anyone had some examples that would fantastic.
joe
08-02-2014 06:14 PM
Hi Joe,
Attached are three vi's to get started with. AzElAntennaPattern generates a dipole antenna pattern (r = sin(theta)) in radius, elevation (theta), azimuth (phi) coordinates. It transforms the coordinates to Cartesian and puts every azimuth sweep into a new row in an array. This creates 3x 2D arrays, one for X, Y and Z, each row an azimuth sweep. These can then be plotted in a 3D parametric graph. Technically the parametric graph accepts spherical coordinates, but it won't draw axes or grids in spherical as far as I can tell. I'm sure it uses the normal spherical coordinates anyway, so best to transform to Cartesian yourself. DipoleWrite, generates azimuth sweep files and puts them into a folder you choose. Choose the folder by pressing the small folder icon before running it. AzElAntennaPatternFromFolder, shows how to read these files back in and plot them. If you post one of your files, I can help with a file reader.
Good luck!
08-02-2014 06:14 PM
Here is screenshot of the plot...
09-04-2014 03:55 PM
GabeG,
Hi, thanks for the suggestions and example code it has helped tremendously. I have createad a large file that has three columns, phi, azimuth, and magnitude. Is it possible to generate a 3-D graph from this data file? I will attach the file.
Thanks,
joe
09-25-2014 08:36 AM
Hello all, I wanted to follow up with my solution. The main vi that you need to run is volumetric_plot.vi. I have also included the data files in a zip file. The other vi's are supporting files. This may help someone in the future. joe