AnsweredAssumed Answered

Problem with applying error correction

Question asked by mprathap on Feb 24, 2011
Latest reply on Feb 25, 2011 by daras
Hello,

I am using the following code to retrieve S41 and S31 from my network analyzer (PNA-L N5230A) using SCPI over TCP/IP. FYI I use Matlab for the whole exercise.

I am experiencing a problem with the following code:


fprintf(vna, ['MMEM:LOAD:CSAR "' calfile '"']);             % calfile is a variable containing the name of the .csa file on the VNA. I calibrated the VNA manually and stored the state in this .csa file.

<More Code>

fprintf(vna, 'CALC:PAR:SEL "CH1_S41_1"');                 % These traces were defined in the earlier part of the code
fprintf(vna, 'CALC:PAR:SEL "CH1_S31_2"');                

fprintf(vna, 'CALC:DATA:SNP:PORT? "1,4"');
Data_41 = binblockread(vna, 'double');

fprintf(vna, 'CALC:DATA:SNP:PORT? "1,3"');
Data_31 = binblockread(vna, 'double');


The problem is that the calibration is not applied on the data I get back from the VNA. The state defined by the .csa file also has the correction turned ON.

I tried querying the correction status with query(vna, 'SENS:CORR?') and I get '1' before the first CALC:DATA is executed. After this goes to '0' after the call. i.e.


query(vna, 'SENS:CORR?')                                                % Returns 1
fprintf(vna, 'CALC:DATA:SNP:PORT? "1,4"');
Data_41 = binblockread(vna, 'double');
query(vna, 'SENS:CORR?')                                                % Returns 0

Any thoughts on what is going wrong here would be deeply appreciated.

P.  

Outcomes