Agilent Technologies 86038B User Manual page 194

Photonic dispersion and loss analyzer
Table of Contents

Advertisement

194
double xStep;
int
npoin;
string buf;
int
cnt;
double x;
// Get the gain data from port one
gainData = pdlaClient.Results.YData(ODACommon.eMeasurementType.Gain,
ODACommon.eODAPort.One);
npoin=gainData.Length;
// Get the start and stop wavelengths
xStart = pdlaClient.Results.XStart(ODACommon.eMeasurementType.Gain);
xStop = pdlaClient.Results.XStop(ODACommon.eMeasurementType.Gain);
xStep = (xStop - xStart)/ (npoin -1);
// Open the file
StreamWriter file = new StreamWriter(fileName, false);
file.WriteLine("Sample PDLA File");
file.WriteLine("Wavelength (nm), Gain (dB)");
// Write the data
for (cnt=0;cnt<npoin;++cnt)
{
x = xStart + cnt * xStep;
buf = x.ToString() + ", " + gainData[cnt].ToString();
file.WriteLine(buf);
}
// Close the file
file.Close();
}
7 Run the software, connect and take a sweep. Look for
c:\mydata.txt. You can look at it with a text editor or import
it into a spreadsheet.
Tip:
This program will grab data even if sweep is triggered from
front panel. Run the software, and then connect. Go to the
PDLA front panel and click Local, then take a sweep. You will
see the update messages appear on our application, and the
application will detect end-of-sweep and transfer the data.
8 Exit the application when done.
Agilent 86038B Photonic Dispersion and Loss Analyzer, Second Edition

Advertisement

Table of Contents
loading

Table of Contents