LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looping and plotting questions

Also, ideally, I would like a program that does the following:
1. It should cycle through the rotations of the translation stage and after every rotation, it should save the data for the traces (most likely will be2) that I have on the screen (and frequency?) in a new data file every time (or the same data file if it's excel or something because I can manipulate that in matlab - where i do my data analysis).
2. I would like for, on the front panel, the traces and position of the rotation stage (degrees) to be updated after every turn. Is there some built-in LabVIEW functionality for this. Let me stress again that I've never used this program before, and that I'm using for the compatibility of these two separate devices.

I am now able to save the data to a file, but are there any suggestions on how to loop and save the file as a different name every time or in the same file (same file would be more aesthetically pleasing).

Also, how does one go about plotting?

Thanks,
qo 

0 Kudos
Message 1 of 4
(2,892 Views)

It is really unclear what you are asking. Where are these "traces" coming from? How do they end up one the screen? What screen are we talking about? What do you mean cycle through the rotations of the translation stage? Do you mean the program is controlling the translation stage, if so, how, control signals, messages, what?

 

As to saving the individual "test's" data to individual files, well that should be doable, and saving it in a "tab delimited" or "comma seperated variables" form is fairly easy.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 4
(2,874 Views)

Sorry for the confusion; it was a very badly written message.  The traces are coming from an Agilent network analyzer (ENA 5071C) that I have the drivers for.  The screen of the ENA shows the traces in question.    I have a translation stage with an obstacle on top.  I have two horn antennas (one that emits microwaves and one that receives) and these two horn antennas are connected to the ENA.  I am measuring the transmission (and maybe phase - these are the 2 traces I am talking about) through the obstacle.  I am using LabVIEW to control both the stage and the ENA.  I want to rotate the stage, and then extract the data from the ENA, rotate the stage, extract, etc. Each trace/data array has 1601 points.

 

Ideally, I would like to save the extracted data in one file which I can then analyze using Matlab.  My question was is there a way I can loop and save the data in one fil

 

And on the front panel, I would like to be able to plot the updated graphs after each rotation.

 

If there are any more questions, please ask.

 

Any thoughts or suggestions,

 

Thanks,

molphys

0 Kudos
Message 3 of 4
(2,867 Views)

Hello Molphys,

 

thank you for your post on our webforum. I think it is best to review a example, and go further from there. Please start the example finder (under help) and go to fundamentals => file in and output. A good example is write to text file.vi. In this example each iteration an array of data will be written to a text file. The array to spread sheet function is important to get the values into the right format. In this example they are saving in a txt file, you can change this, it shouldn't be a problem to open the file since there are tabs between the measurement values.

You are able to use a chart for writing the array with data to; each iteration the chart will be updated, and you will see the history and the new values that are written to the chart.

 

I hope this will help you further, please let me know if there are any additional questions.

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 4 of 4
(2,787 Views)