Agilent Technologies 86038A User Manual page 171

Optical dispersion analyzer
Table of Contents

Advertisement

Example 1: Simple Application for Controlling the ODA
Agilent 86038A Optical Dispersion Analyzer, Third Edition
Dim xStep As Double
Dim npoin As Integer
Dim cnt As Integer
Dim idx As Integer
Dim buf As String
' Get the data and figure out the wavelength axis
gainData = odaClient.Results.YData(Agilent.LWD.Ag86038x.Instru-
mentObjects.ODACommon.eMeasurementType.Gain, _
Agilent.LWD.Ag86038x.InstrumentObjects.ODACom-
mon.eODAPort.One)
npoin = UBound(gainData) - LBound(gainData)
xStart = odaClient.Results.XStart(Agilent.LWD.Ag86038x.Instru-
mentObjects.ODACommon.eMeasurementType.Gain)
xStop = odaClient.Results.XStop(Agilent.LWD.Ag86038x.Instrumen-
tObjects.ODACommon.eMeasurementType.Gain)
xStep = (xStop - xStart) / (npoin - 1)
' Open the file and write the data
Dim file As System.IO.StreamWriter
file = New System.IO.StreamWriter(fileName)
file.WriteLine("Sample ODA File, written from Visual Basic.net")
file.WriteLine("Wavelength (nm), Gain (dB)")
idx = 0
For cnt = LBound(gainData) To UBound(gainData)
buf = CStr(xStart + xStep * idx) + "," + CStr(gainData(cnt))
file.WriteLine(buf)
idx = idx + 1
Next
file.Close()
End Sub
End Class
Remote Operation
171

Advertisement

Table of Contents
loading

Table of Contents