Agilent Technologies 86038B User Manual page 173

Photonic dispersion and loss analyzer
Table of Contents

Advertisement

Agilent 86038B Photonic Dispersion and Loss Analyzer, Second Edition
pdlaClient_TriggerProgress, with two pass parameters
already declared. Progress is an enumerated type which tells
you whether you are at the begin or end, and eTriggerMode,
which tells you whether the current activity is a
measurement or a normalization.
Click on the next line after the sub declaration, and type:
If eTriggerMode =
When you type the '=' (equals sign), the Visual Basic editor
will Intellisense all the possible values of the enumeration,
and present you a list. In this case you want eMeasurement.
Intellisense makes dealing with events and enumerated types
much easier in Visual Basic.
Fill out the function so it looks like:
If eTriggerMode = enumAcquisitionMode_eMeasurement Then
If progress = enumStatus_COMPLETE Then
sendDataToFile ("c:\mydata.txt")
End If
End If
5 Add the
function. This is a very simple implementation using text
sendDataToFile
streams. Insert this function immediately after
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
Dim buf As String
' Get the data and figure out the wavelength axis
gainData = pdlaClient.Results.YData _
(eMeasurementType_Gain,eODAPort_One)
npoin = UBound(gainData) - LBound(gainData)+1
xStart = pdlaClient.Results.xStart(eMeasurementType_Gain)
xStop = pdlaClient.Results.xStop(eMeasurementType_Gain)
pdlaClient_TriggerProgress:
173

Advertisement

Table of Contents
loading

Table of Contents