188
Agilent 86038B Photonic Dispersion and Loss Analyzer, Second Edition
Form1: public class From1 …
Find the block of private declarations of the form
components. There should be a Text Box and a Label. You are
going to add the pdla client object as a member. Insert the
following line after the Text Box and Label declarations:
// Declare a local object to communicate with the PDLA
private RemoteClient.Communicator pdlaClient;
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();
9
Before you can talk to the PDLA, you have to establish a link to it. Place a
Button on the form and name it
pbConnect
with text
Connect
. Double click
the button to edit the source code. This will place you at
pbConnect_Click
.
This is where the connection to the PDLA is established. Place the following
lines inside the curly braces:
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 clean out of the PDLA interface.
The second line grays out the Connect button so we don’t
forget and connect twice.
10 Go to the Form display window, and click on a blank area of
the form to select the form. Go to the Properties window, and
select events (small yellow lightning bolt at top of form.) Find
and double click on the closing event. This will take you to
the Form1_Closing routine, 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.
11 Click the
Run
button to compile the application. If there are
errors, fix them before continuing. Once the compile is
successful, the application window will appear. Click the
Connect
button, and watch the PDLA front panel. A green
banner will appear on the PDLA, announcing Remote User
Summary of Contents for 86038B
Page 1: ...Agilent 86038B Photonic Dispersion and Loss Analyzer User s Guide ...
Page 4: ...4 ...
Page 20: ...20 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition ...
Page 34: ...34 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition Figure 2 b Rear Panel ...
Page 78: ...78 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition ...
Page 92: ...92 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition ...
Page 202: ...202 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition End Sub ...
Page 348: ...348 Agilent 86038B Photonic Dispersion and Loss Analyzer Second Edition ...
Page 349: ......