I have some problem when I try to use sweep average during S-parameter measurement. I set the sweep average to 10. On the screen, it shows the sweep count correctly. However, when I try to use Vee program to grab the averaged data. It doesn't wait until the whole average is done before giving me the data. However can I let the PNA wait until average is done before return the S-Parameter value? In the attachment is the vee code I wrote to do the S-parameter measurement. Thanks!
You need to use the groups control, not init:imm; Init:imm means "take as sweep and return right away". For you , you need to use groups.
Send these commands:
(early in the program)
sens:swe:mode hold !this holds the sweeps and makes programming faster to respond
Trig:sour imm ! this puts the PNA in normal internal triggered mode
SENS:AVER:CLE ! this resets the averaging
sens:aveg:coun 10 ! set this to the number of averages
sens:swe:gro:coun 10 ! set this to the number of averages
sens:swe:mode gro ! take 10 sweeps
opc? ! opc returns when 10 sweeps are finished.
Use this sequence always, (even when not averaging). To do single sweeps, set the count to 1.
I followed the instructions. However, when I tried to run the program, it gives an error "undefined header". It seems can not recognize "SENS:SWE:MODE GRO". Do you have any idea what might be problem? Thanks!