Agilent Technologies 86038B User Manual page 179

Photonic dispersion and loss analyzer
Table of Contents

Advertisement

Agilent 86038B Photonic Dispersion and Loss Analyzer, Second Edition
The pdlaClient will host all the interaction with the PDLA.
Before you can use it, though, you have 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:
pdlaClient = New RemoteClient.Communicator()
8 Before you can interface with the PDLA, you need to
establish a link to it. Place a Button on the form, name it
pbConnect with text
the source code. This will place you at pbConnect_Click. To
establish the connection to the PDLA, place the following
lines between the Private Sub ... End Sub block:
pdlaClient.Connectivity.Connect(tbPdlaName.Text)
pbConnect.Enabled = False
You need to implement a disconnect method, since whenever
you connect, you need to disconnect when you are done. 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.
9 Go to the code window, and click the selector at the upper
left corner of the code window. It probably says Form1.
Change it to say (Base Class Events). Now the selector at the
upper left corner lists the various events we can write code
for. It probably says (Declarations). Click on the selections,
and choose Closing. This will take you to Form1_Closing,
where you can insert the following lines:
pdlaClient.Connectivity.Disconnect()
pdlaClient.Connectivity.TerminateSession()
The first line disconnects from the PDLA itself, the second
line cleans up the pdlaClient. Make sure that
TerminateSession is the last thing you do before exiting this
routine.
10 Click the
button to compile the application. If there are
Run
errors, fix them before continuing. Once the compile is
successful, the application window will appear. Click the
button, and watch the PDLA front panel. A green
Connect
banner will appear on the PDLA, announcing Remote User
Connected. If this does not appear, it is most likely because
the PDLA Name is incorrect, or the PDLA itself is not
properly configured for networking (check the LAN
connection). Go to the PDLA front panel and select Help >
About to verify the PDLA Name.
. Double click the button to edit
Connect
179

Advertisement

Table of Contents
loading

Table of Contents