Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

S Parameter measurement and saving touchstone file format (.sNp)

Hello,

 

I am trying to collect s-parameter data and am having trouble saving the results in the touchstone file format (.snp). When I run the VI (attached), I can view the results locally on the vna for all 9 s-parameters since I am doing a 3-port measurement. However I cannot find any command or option to export the data in a .s3p format. I am using the Keysight N5227A  PNA Network Analyzer and have the drivers associated with it. I am communicating with the instrument through GPIB as well.

 

Thanks in advance!

0 Kudos
Message 1 of 8
(4,189 Views)

Hi wasadi,

 

The Keysight PNA-X driver examples conveniently do not provide a clear example of how to do this.  Its likely because of the multiple formats and number of s-parameters configurations possible, but it would have been nice to see a simple case.  I struggled with it and eventually settled on this approach..

 

  • I create a instrument state / caibration measurement file (*.csa) and save it on the PNA-X.  Could be 1,2,3,4 port it doesn't matter at this point.  What's nice is that you can customize the markers, and plot displays ahead of time which helps debug the measurement and monitor progress.  Save the *.csa file to the PNA-x internal storage (record the directory name).
  •  
  • Then my LabVIEW code reloads this *.csa file, avoiding a lot of setup code and unnecessary complexity and possible errors.  (i.e. you can reuse the load for any number of ports and s-paramters unlike your example which is fixed.)
  •  
  • Then my LabVIEW code runs the measurement, waits for the measurement to complete, transfers the data to the PC as a big blob of text, then reformats it to save as *.snp.  Here you need to handle the format of *.snp to match you *.csa data format.  
  •  
  • I've include the links that I used to learn/sort out how to do this in the VI below.

 

Here's the code I use for 2-post (*.s2p).

PNA-X_recall+measure+s2p_RI.png

 

save_s2p_file.png

 

Note: I didn't include the FileProperties ctl or BuildFilenmae.vi since these are just my filename formatting, and not really useful to others.  Just wire a filename directly for testing.

 

Hope that helps.

Craig

Download All
0 Kudos
Message 2 of 8
(4,129 Views)

Hello  CStorey,

Thank you for the Sparameter Measurement Code idea


I tried accessing your code and I am able to get the data in S2P format. But I cant obtain the values measured for S11, S21,S12,S22, also the last value measured  shows zero in frequency row from PNA N5224A. I am Also attaching the document below. Could you please suggest me any changes as I have created my own file name VI which is attached below.

 

Hoping to hear from you soon

Thank you in Advance!

 

Kind Regards,
Gauri

 

Gaura2495_1-1658845938495.png

 

 




0 Kudos
Message 3 of 8
(3,640 Views)

You need to look at the first file again.  It loads a setup file, runs a measurement, retrieves the data to be saved by the subvi.  Your program just loads a file and then tries to save data, but never actually makes a measuement so you get all zeros.

 

As for the extra point a 5Hz, I would check the number of points in your setup file and make sure they match the number of data points you are trying to read.  Here I think you are asking for 1 pt too many.

 

Craig

0 Kudos
Message 4 of 8
(3,633 Views)

Hello Craig,


Thank you so much for your suggestions I am successfully able to get the data in S2P format. Thank you once again for your promt response.

Kind Regards,

Gauri

0 Kudos
Message 5 of 8
(3,607 Views)

Hi cstorey

I was finding some help to get S21 parameter from N5224A PNA (VNA) using Labview, for antenna system. Although I am able to get S21 and save it continuously in a text file. However, the problem is that there are certain readings after 3 to 4 correct readings, where the I get -200 power level (which is meaningless). I tried a lot, but could not correct these glitches in the Labview code.

For example, power level -42 dB, -42.15, -38, and then -200, -200,-200, then again correct readings in the range.

I believe there is some issue in the code or subVI which is causing these glitches.
Could you please share a simple Labview code for getting S21 from Keysigth N5224A VNA.

Note that i am connecting a motor(rotator) for moving antenna, and measuring the radiation pattern usign S21 from VNA.

Any help in this regard would be highly appreciated. THANKS

0 Kudos
Message 6 of 8
(2,312 Views)

Hi cstorey,

Adding to my questions, attached is a raw S21 file received from VNA for one complete rotation.

 

If you could have a look at it, you will see glitches after every 2 or 3 correct readings. Note that every reading is corresponding to an angle, from -90 degrees to +90 degrees with 1-degree step.

 

So effectively where there is a glitch (-200), it means we donot get correct power level from VNA on that angle.

0 Kudos
Message 7 of 8
(2,307 Views)

You're question doesn't seem to have anything to do with the original posted code, so it's best to start a new thread. 

In that thread attach your code, so we can see what you are doing.  Describe your cal setup also.

 

As it stands I see the error but can't begin to guess at what's going wrong.

0 Kudos
Message 8 of 8
(2,279 Views)