Question
I remote control the power head to get data out of it.
I use the external trigger (EXT2) to trigger the measurement. All commands are correct but I get no response on the 'FETCh?' command. What is missing.
Here my script:
function NRPxxSN(~)
% Open a RAW socket connection
NRPxxSN=tcpip('nrp18sn-101765',5025);
NRPxxSN.InputBufferSize=10000;
fopen(NRPxxSN);
% Make a preset and configure the measurement
fprintf(NRPxxSN, '*RST;*CLS;*WAI');
fprintf(NRPxxSN, 'UNIT:POW DBM');
fprintf(NRPxxSN, 'SENS:FUNC "XTIME:POW"');
fprintf(NRPxxSN, 'CALC:FEED "POW:TRAC"');
fprintf(NRPxxSN, 'SENS:TRAC:POIN 500');
fprintf(NRPxxSN, 'SENS:TRAC:TIME 2e-3');
fprintf(NRPxxSN, 'SENS:TRAC:AVER OFF');
fprintf(NRPxxSN, 'SENS:FREQ 1e9');
fprintf(NRPxxSN, 'TRIG:SOUR EXT2');
fprintf(NRPxxSN, 'INIT:CONT OFF');
% Initiate the measurement
fprintf(NRPxxSN, 'INIT');
% Get the result
fprintf(NRPxxSN, 'FETC?');
a=fscanf(NRPxxSN);
% Close the connection and clean up:
fclose(NRPxxSN);
delete(NRPxxSN);
end