Agilent Technologies 86038B User Manual page 169

Photonic dispersion and loss analyzer
Table of Contents

Advertisement

Agilent 86038B Photonic Dispersion and Loss Analyzer, Second Edition
Note that the name of the Remote Client might appear as a
long string "This is the RemoteClient for the Photonic
Dispersion and Loss Analyzer." Click
References dialog.
9 Right click on the Form and select
simple Form.vb Code window, which is probably empty
except for Option Explicit. Add the pdlaClient object as a
member right after that line:
Private WithEvents pdlaClient As RemoteClient.Communicator
The pdlaClient will host all the interaction with the PDLA.
Before you can use it, though, you need to 'new' the object. Go
back to the Form view, and double click on an unused area of
the form. This takes you to the Form1_Load routine, where
you can insert the following line directly above End Sub:
Set pdlaClient = New RemoteClient.Communicator
10 Before you can talk to the PDLA, you have to establish a link
to it. From the tool bar, place a Button on the form. From the
Properties dialog, Name the button
Connect. Double click the button to edit the source code. This
will place you at pbConnect_Click. The connection to the
PDLA is established here. Place the following lines above the
final End Sub:
Call pdlaClient.Connectivity.Connect(tbPdlaName.Text)
pbConnect.Enabled = False
You need to implement a disconnect method. This avoids a
time-consuming clean up when a connection goes stale and
has to be cleaned out of the PDLA interface.
The second line grays out the Connect button so you do not
forget and connect twice.
11 Go to the code window, and click the drop down list box at
the upper left corner of the Code window. It probably says
pbConnect, since you were just editing the connect method.
Change it to
. Now the list box at the upper right corner
Form
to close the
OK
. This brings up a
View Code
with Caption
pbConnect
169

Advertisement

Table of Contents
loading

Table of Contents