Complete Source Code - Agilent Technologies 86038B User Manual

Photonic dispersion and loss analyzer
Table of Contents

Advertisement

Complete source code

Agilent 86038B Photonic Dispersion and Loss Analyzer, Second Edition
wavelength. Find the pbSweep_click method, and insert the
following code immediately before pdlaClient.Measure:
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 = centerWavel + span / 2
It works better if you first set the PDLA to a relatively narrow
sweep, such as 1530 to 1540 nm.
Option Explicit
' Declare the pdlaClient.
Private WithEvents pdlaClient As RemoteClient.Communicator
Private Sub Form_Load()
' Instantiate the pdlaClient
Set pdlaClient = New RemoteClient.Communicator
End Sub
Private Sub Form_Unload(Cancel As Integer)
' Disconnect from PDLA and clean up on our side
pdlaClient.Connectivity.Disconnect
pdlaClient.Connectivity.TerminateSession
End Sub
Private Sub pdlaClient_NewStatus(ByVal Message As String, ByVal MessageType As
InstrumentObjects.eEventLogType)
' Let the user know something happened
lblStatus.Caption = Message
End Sub
Private Sub pdlaClient_TriggerProgress(ByVal progress As
InstrumentObjects.enumStatus, ByVal eTriggerMode As
InstrumentObjects.enumAcquisitionMode)
If eTriggerMode = enumAcquisitionMode_eMeasurement Then
If progress = enumStatus_COMPLETE Then
sendDataToFile ("c:\mydata.txt")
End If
End If
End Sub
Private Sub sendDataToFile(ByVal fileName As String)
175

Advertisement

Table of Contents
loading

Table of Contents