Agilent 86038B Photonic Dispersion and Loss Analyzer,
Second Edition
185
Private Sub pbSweep_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles pbSweep.Click
' Don't do anything if not connected to PDLA
If pdlaClient.Connectivity.IsConnected = False Then
MessageBox.Show("Can't take a measurement yet - not connected.")
Return
End If
' Change the center wavelength. Read existing start and stop wavelength to get
' span, use new center to recalculate start and stop
Dim centerWavel, startWavel, stopWavel, span, oldCenter As Double
startWavel = pdlaClient.MeasurementRange.XStart
stopWavel = pdlaClient.MeasurementRange.XStop
span = stopWavel - startWavel
centerWavel = CDbl(txtCenter.text)
If centerWavel < 1400 Or centerWavel > 1700 Then
MessageBox.Show("Wavelength out of range, defaulted to 1550")
centerWavel = 1550
txtCenter.Text = "1550"
End If
pdlaClient.MeasurementRange.XStart = centerWavel - span / 2
pdlaClient.MeasurementRange.XStop = cente span / 2
' Now trigger the measurement
pdlaClient.Measure()
End Sub
Private Sub pdlaClient_TriggerProgress(ByVal progress As
Agilent.LWD.Ag86038x.InstrumentObjects.ODACommon.enumStatus, ByVal
eTriggerMode As
Agilent.LWD.Ag86038x.InstrumentObjects.ODACommon.enumAcquisitionMode)
Handles pdlaClient.TriggerProgress
' Only do something if this is a measurement
If eTriggerMode =
Agilent.LWD.Ag86038x.InstrumentObjects.ODACommon.enumAcquisitionMode.eMea
surement Then
' Only do something if the measurement is complete
If progress =
Agilent.LWD.Ag86038x.InstrumentObjects.ODACommon.enumStatus.COMPLETE Then
' Write the data to disk
sendDataToFile("c:\mydata.txt")
End If
End If
End Sub
Private Sub sendDataToFile(ByVal fileName As String)
Dim gainData() As Double
Dim xStart As Double
Dim xStop As Double
Dim xStep As Double
Dim npoin As Integer
Dim cnt As Integer
Dim idx As Integer
Summary of Contents for 86038B
Page 1: ...Agilent 86038B Photonic Dispersion and Loss Analyzer User s Guide ...
Page 4: ...4 ...
Page 20: ...20 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition ...
Page 34: ...34 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition Figure 2 b Rear Panel ...
Page 78: ...78 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition ...
Page 92: ...92 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition ...
Page 202: ...202 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition End Sub ...
Page 348: ...348 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition ...
Page 349: ......