AnsweredAssumed Answered

Matlab E8361A via LAN. S2P files and s parameters calculatio

Question asked by svia on Oct 24, 2007
Latest reply on Oct 25, 2007 by odanzy
Hello again, I have a problem with my script after several days and I haven't found the solution, and the online help for PNA doesn’t help me too much.

What I'm trying to do is very simple, to measure the 4 parameters S for a 2 port circuit, for different DCs. I'll like to generate a s2p file and to transfer it from the PNA to the PC.
I have defined 4 measurements, like these:

fprintf(ona,'CALC1:PAR:DEF "s11meas" ,S11');
fprintf(ona,'CALC1:PAR:DEF "s12meas" ,S12');
fprintf(ona,'CALC1:PAR:DEF "s22meas" ,S22');
fprintf(ona,'CALC1:PAR:DEF "s21meas" ,S21');

Then I have created one window, and only one channel, but 4 traces, in order to display all the s-parameters in the same window. Everything seems ok. But when I want to calculate the S parameters, first I  select  each measurement, which it seem no necessary, because only the last one will remain selected.

fprintf(ona,'CALC1:PAR:SEL "s11meas"');
fprintf(ona,'CALC1:PAR:SEL "s12meas"');
fprintf(ona,'CALC1:PAR:SEL "s22meas"');
fprintf(ona,'CALC1:PAR:SEL "s21meas"');

Need I to select all the measurements or only the channel?

My real problem anyway is the following command:
fprintf(ona,'CALC1:DATA:SNP? 2');

The PNA displays the following message: Error -410 Query Interrupted.
I have forced the script to stop after this command for 20s using a Matlab pause(20), but even then the answer is error -410.

Anyway, a file is created which it seems correct in my PNA, from the start to the stop frequency. I used this command to create it:

coms=['MMEM:STOR "sparam',vnstr,'.s2p"'];
    fprintf(ona,coms);

I don't know which is the cause of the error .

And my last question is to transfer files from  the PNA to the PC, taking into account that I use a visa object, how to do it?
I used:

comf=['MMEM:TRAN? "sparam',vnstr,'.s2p"'];
    fprintf(ona, comf )
But it doen't seem to work.


Thank you very much for your help. And sorry for the spelling.  

Outcomes