AnsweredAssumed Answered

I/O questions for PNA-X N5242A

Question asked by tamintai on Feb 16, 2012
Latest reply on Feb 17, 2012 by odanzy
I get a problem while I use the Matlab to get the S11 data from the network analyzer (PNA-X N5242A)
The following is my code:
PNAX=visa('ni','GPIB1::16::INSTR','InputBufferSize', 10000000,'Timeout',100);
fprintf(PNAX,'SYST:PRES');                        % preset the system
fprintf(PNAX,'CALCulate:PARameter:DEFine:EXT ''MyMeas'',S11')   % define My measurement as MyMeas
% Export data  I/O program
fprintf(PNAX, 'FORM:BORD SWAP');             % Set byte order to swapped (little-endian) format
fprintf(PNAX, 'FORM REAL,64');                  % Set data type to real 64 bit binary block
fprintf(PNAX,'CALC:PAR:SEL "MyMeas"');     % select data from MyMeas
fprintf(PNAX,'CALC:FORM MLOGarithmic');    % Log scale
fprintf(PNAX,'CALC:DATA? FDATA');               % catach the data from monitor
After I plot the data, the S11 became "Positive" but the monitor shows a "negative".   Negative value is a correct measurement. But while I use the binblockread to read out the data from the PNA-X buffer, the minus sign miss.
You can see the attached figure then you will figure out immediate. 
I have no idea how to deal with it. This samll bug bother me for a while. 
Is there anyway who can help me with this?  Thank you a lot.