60
U9361C/F/G/M RCal Receiver Calibrator Measurement Guide
Programming with MATLAB
fprintf(my_SA, ':SYST:CAL:ROW1:FREQ:STAR %s', freq_start);
fprintf(my_SA, ':SYST:CAL:ROW1:FREQ:STOP %s', freq_stop);
% Given Mechanical Attenuation State, go +/- x dB in 2 dB steps
mech_atten_num = str2num(mech_atten)
mech_atten_start = num2str(mech_atten_num - (mech_atten_range/2))
mech_atten_stop = num2str(mech_att (mech_atten_range/2))
mech_atten_step = '2'
fprintf(my_SA, ':SYST:CAL:ROW1:ATT:TYPE STEP');
fprintf(my_SA, ':SYST:CAL:ROW1:ATT:STAR %s', mech_atten_start);
fprintf(my_SA, ':SYST:CAL:ROW1:ATT:STOP %s', mech_atten_stop);
fprintf(my_SA, ':SYST:CAL:ROW1:ATT:STEP %s', mech_atten_step);
% Bypass electronic attenuation if it is disabled or 0dB
% QUERY automatically returns ['x' char newline]
if elec_atten == ['0' char newline]
fprintf(my_SA, ':SYST:CAL:ROW1:EATT:TYPE BYP');
else
elec_atten_num = str2num(elec_atten)
elec_atten_start = num2str(elec_atten_num - (elec_atten_range/2))
elec_atten_stop = num2str(elec_att (elec_atten_range/2))
elec_atten_step = '2'
fprintf(my_SA, ':SYST:CAL:ROW1:EATT:TYPE STEP');
fprintf(my_SA, ':SYST:CAL:ROW1:EATT:STAR %s', elec_atten_start);
fprintf(my_SA, ':SYST:CAL:ROW1:EATT:STOP %s', elec_atten_stop);
fprintf(my_SA, ':SYST:CAL:ROW1:EATT:STEP %s', elec_atten_step);
end
fprintf(my_SA, ':SYST:CAL:ROW1:IF:PATH %s', IF_path);
if preamp_enable == ['0' char newline]
fprintf(my_SA, ':SYST:CAL:ROW1:POW:GAIN:BAND OFF');
else
fprintf(my_SA, ':SYST:CAL:ROW1:POW:GAIN:BAND %s', preamp);
end
fprintf(my_SA, ':SYST:CAL:ROW1:COUP %s', coupling)
fprintf(my_SA, ':SYST:CAL:ROW1:FREQ:SYNT %s', pno)
fprintf(my_SA, ':SYST:CAL:ROW1:POW:MW:PATH %s', uW_path)
% Mixing Mode and Match State are default on new row addition
% Uncomment below to automatically calibrate for single added row
% input('Switch cable from SG to RCal Unit, then press ''enter''...', 's');
% fprintf(my_SA, ':SYST:CAL:INIT:SEL')