Agilent Technologies 86038A User Manual page 159

Optical dispersion analyzer
Table of Contents

Advertisement

Example 1: Simple Application for Controlling the ODA
Agilent 86038A Optical Dispersion Analyzer, Third Edition
1 Add a button to the UI and Name it pbSweep, Caption Take Sweep.
2 Double click the button to go to the pbSweep_Click function, and insert the
following lines to make sure you are connected before actually taking a
measurement:
' Don't do anything if not connected to ODA
If odaClient.Connectivity.IsConnected = False Then
MsgBox ("Can't take a measurement yet - not connected.")
Exit Sub
End If
odaClient.Measure
3 Run the software, click Connect and wait for the connection to complete. Then
click Take Sweep, and watch the sweep progress on both the ODA and on the
application message bar.
4 Add an event routine for TriggerProgress.
The
event has two pass parameters -
TriggerProgress
enumAcquisitionMode
current activity.
This function checks the
trigger event (that is, measurement, normalization, TLS settling and so on)
and then checks the
enumStatus
data is available. If so, call
In the Source Code window, select
upper left hand corner of the window, then select
Method Selector in the upper right hand corner. This takes you to the sub
odaClient_TriggerProgress
Progress is an enumerated type which tells you whether you are at the
begin or end, and
eTriggerMode
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.
. This indicates the status and progress of the
enumAcquisitionMode
to see if the event is finished, indicating
.
sendDataToFile()
in the Object Selector in the
odaClient
, with two pass parameters already declared.
, which tells you whether the current
Remote Operation
and
enumStatus
to determine the type of
in the
TriggerProgress
159

Advertisement

Table of Contents
loading

Table of Contents