I' ve inputed the following commands and entered list sweep mode. Which command can be used to grab the result? I want to repeatedly do zero span on the listed frequencies.
% Initial setup
mxa_ip = '192.168.0.8';
mxa_port = 5025;
mxa=tcpip(mxa_ip, 5025);
% input buffer size to receive trace data
% should be at least 4 times the number of trace
% points for 32-bit real format
set(mxa,'InputBufferSize',100000);
fopen(mxa);
fprintf(mxa,'CAL:AUTO OFF');
fprintf(mxa,'INST:SEL SA');
fprintf(mxa,'INIT:CONT OFF');
fprintf(mxa,'LIST:FREQ 890.2MHz,890.4MHz');
fprintf(mxa,'LIST:ATT 10dB');
fprintf(mxa,'LIST:BAND:RES:TYPE FLAT');
fprintf(mxa,'LIST:BAND:RES 300kHz');
fprintf(mxa,'LIST:BAND:VID 3MHz');
fprintf(mxa,'LIST:SWE:TIME 600ms');
fprintf(mxa,'LIST:DET RMS');
fprintf(mxa,'LIST:TRIG:SOURce IMM');
fprintf(mxa,':SENSe:SWEep:TYPE:AUTO:RULes SPEed');
fprintf(mxa,'READ:LIST?');
% Initial setup
mxa_ip = '192.168.0.8';
mxa_port = 5025;
mxa=tcpip(mxa_ip, 5025);
% input buffer size to receive trace data
% should be at least 4 times the number of trace
% points for 32-bit real format
set(mxa,'InputBufferSize',100000);
fopen(mxa);
fprintf(mxa,'CAL:AUTO OFF');
fprintf(mxa,'INST:SEL SA');
fprintf(mxa,'INIT:CONT OFF');
fprintf(mxa,'LIST:FREQ 890.2MHz,890.4MHz');
fprintf(mxa,'LIST:ATT 10dB');
fprintf(mxa,'LIST:BAND:RES:TYPE FLAT');
fprintf(mxa,'LIST:BAND:RES 300kHz');
fprintf(mxa,'LIST:BAND:VID 3MHz');
fprintf(mxa,'LIST:SWE:TIME 600ms');
fprintf(mxa,'LIST:DET RMS');
fprintf(mxa,'LIST:TRIG:SOURce IMM');
fprintf(mxa,':SENSe:SWEep:TYPE:AUTO:RULes SPEed');
fprintf(mxa,'READ:LIST?');
myresult=fscanf(mxa,'%s');
or
myresult=fgets(mxa);
or even
myresult=fgetl(mxa);