I would like to capture the IQ data of a brief pulse using my E4440A PSA. This capture must be precisely aligned so that the beginning of the pulse coincides with the beginning of the capture. The pulse is a chirp (sinusoid plus sweep) generated by my 81150A. I hooked up the strobe out from the 81150A to the rear external trigger input on my E4440A. I have it set up so that the strobe out outputs a pulse at the beginning of each sweep. The trigger seems to work when I am working on the E4440A box directly, but when I try to remotely capture the data, the captured data is not aligned to the beginning of the pulse. My Matlab code used to capture the pulse follows. How may I capture IQ data that is aligned in time via a trigger? Thank you very much!
sa=icdevice('Agilent_SA_Driver.mdd', tcpip(psa_ip,5025));
connect(sa);
%Measurement Setup
set(sa,'Mode','Basic');
invoke(sa,'WriteSCPI','*RST;:DISP:ENAB ON');
set(sa,'SAFreqCenter',40E6);
set(sa,'SASweepSingle','Off');
set(sa,'WavAcquisitionTime',0.0001);
set(sa,'WavRBW',40e6)
set(sa,'WavTriggerSource','External_Rear')
invoke(sa, 'SAInitiate');
invoke(sa,'QuerySCPI','*OPC?');
%Get IQ Data
IQData=invoke(sa,'WavReadIQData');
sampleRate=get(sa,'WavSampleRate');
%Disconnect from the Instrument
delete(sa);
clear sa;
sa=icdevice('Agilent_SA_Driver.mdd', tcpip(psa_ip,5025));
connect(sa);
%Measurement Setup
set(sa,'Mode','Basic');
invoke(sa,'WriteSCPI','*RST;:DISP:ENAB ON');
set(sa,'SAFreqCenter',40E6);
set(sa,'SASweepSingle','Off');
set(sa,'WavAcquisitionTime',0.0001);
set(sa,'WavRBW',40e6)
set(sa,'WavTriggerSource','External_Rear')
invoke(sa, 'SAInitiate');
invoke(sa,'QuerySCPI','*OPC?');
%Get IQ Data
IQData=invoke(sa,'WavReadIQData');
sampleRate=get(sa,'WavSampleRate');
%Disconnect from the Instrument
delete(sa);
clear sa;
Welcome to this Forum and thanks for the question...
It appears that you are taking two acquisitions of data instead of one. The SAInitiate does an :INIT:WAV to perform an acquisition, and the WavReadIQ data does a “READ:WAV0?” which also performs an acquisition.
So, you should either take out the SAInitiate or use the WavFetchIQ function instead of the WavReadIQ function.
Regards -