We are using an Agilent N5234A PNA-L Microwave Network Analyzer, 43.5 GHz Firmware Version: A.10.49.11
When asking for help back in December, someone from Keysight team sent me the following:
[..]
If you want to use the CALS:DATA? SCPI command to get data out of the PNA, you should review the example program at
If you want to use COM commands, then you should review the example program at
[..]
I have seen both of the links you sent to me.
I am interested in the ‘Getting and Putting Data using SCPI’ example which is a Visual Basic program meant to be run from the analyzer. That program does not do what I need; besides, I use a LAN connection to the analyzer from a laptop running a Python script to read data, but it is useful to see the commands that might help me to implement what we need for our project.
At the moment, I am getting the data programmatically using the following commands:
CALC:PAR:SEL "CH1_S11_1”
FORM:DATA ASC,0
In a loop:
SENS:SWE:MODE SING
CALC:DATA? FDATA
Reading the sweep data from the buffer
It is not efficient at all. It takes so much time to perform several sweeps and to get us data to plot.
We need to obtain the data of at least 30 sweeps per second. That is why I am asking you for a way to call sweeps and put them into different blocks of memory for 10-15secs.
In the forums I found the following:
https://community.keysight.com/thread/3664
Question
From Piscesking, on Mar 24, 2008
[..] Can we get real time, continuous block data (Real/Img. format) using N5230A 300kHz-13.5GHz (A.04.87.01) PNA-L network analyzer. [especially S21 / S12 measurement data]. [..]
The answer I am interested on:
From Dr_joel on Mar 27, 2008 10:53 PM, on “Step 2:”, he mentions: “send the comand to take a group of sweeps” (SIC)
My comments
Can I have access to a group of sweeps? How?
Question
Again, from Piscesking, on Apr 2, 2008 10:19 AM
[..]
Hi,
Basically what i want to do is,
- Read complex data (Re/Im) component for each point.
- Save the data into memory.
- Once again trigger the sweep and follow step1 and step2.
- Repeat the above steps a number of times until I use the maximum of memory.
- Transfer the whole bunch of data from memory to hard drive.
[..]
My comments
That is what we need to do. We can get several sweeps, but it takes ages to get us the amount of data we need.
I wonder if you can tell me of a command or a series of commands that can improve my algorithm.
There is this other answer that I am interested in:
From daras, on Apr 2nd, 2008 12:13 PM
[..]
there is however a workaround that might do what you want. Let's assume that the trace you want to measure is S11. Let's also assume that you want to repeat steps 1-3 ten times. Your program will have to create 10 S11 traces in the channel (when you add duplicate traces in a channel, the data acquisition time does not change :D ). Now your program will loop 10 times and each time it will send a trigger to sweep the channel. After each trigger is complete, you will perform a data->memory operation on one of the traces. So by the time the loop is finished each trace's memory trace will have the data from one of the sweeps. Now if you go through all the traces and transfer the memory trace data, you will have the total data collected during the 10 different sweeps.
The total number of times that you can repeat this process is limited by the total number of traces that you can create in the PNA. With the version of firmware that you are running, that limit is 128. With our latest firmware ( A.07.50.28 ), that limit is 8000 (we have increased the total number of windows to 1000 and you can put 8 traces per window). If you plan on doing this, I would suggest turning off the PNA display (COM -> Application.Visible = false or SCPI-> "DISP:VIS off").
[..]
My comments:
How can I put 8 traces in a window and collect those?
Do you know a command or a series of commands that I can use to obtain at least 30 traces per second from the VNA in a short period of time?
Any help is very much appreciated.
Your best bet is the approach I laid out with memory traces. If you do group trigger, there is no way to retain the data from the individual sweeps in the group. so this means you have to send a SINGLE command for each sweep and you have to have enough copies of the trace, so that you can put the result of each sweep into a different memory trace. so for example if you want to do 30 sweeps for an S11, you'll have to have 30 S11 traces and after each sweep iteration n, you have to put data into memory for trace n. when you have completed all 30 sweeps, with your channel in hold, you can then loop through, select each trace and do a "CALC:DATA? SMEM" and transfer the data. the data from trace n memory buffer represents the S11 for sweep number n. I am attaching a VEE program that sets up this example, but if you can't read VEE programs, I am also attaching a SCPI log of all the commands my program is sending to the analyzer. in my example, the actual sweep time of the channel is about 36 microseconds and on my new N5242B PNA-X and new N5232B PNA-L with the latest CPU, I can do the 30 sweeps in a little over 2 seconds and transfer all the data in about 1.3 seconds. however on my older N5247A PNA-X with the older CPU, the same exact set of measurements with the same 36 microsecond sweep time takes about 8.5 seconds to sweep and about 10.5 seconds to transfer the same amount of data. so basically the bottleneck is the Windows OS overhead to process all the SCPI commands. the new B model PNAs have an intel Celeron 2.2 GHz dual core CPU (4.8 windows experience index) and the A model PNA-X has an intel i7 2 GHz quad core (3.3 Windows Experience Index).
So the moral of the story is that even with a very fast channel sweep time of 36 microseconds (this is the physical data acquisition time), the overhead required for processing all the commands you need to save the data from each sweep, is going to make it very unlikely that you can sweep and transfer data from 30 sweeps in 1 second or less.