180
Agilent 86038B Photonic Dispersion and Loss Analyzer, Second Edition
When the program is exited, the remote session will be
disconnected from the PDLA leaving it free for front panel or
other remote use.
Event Handling
Event handling is added to monitor the PDLA events. A very
useful event is a new status message. The status message is
shown on the bottom of the PDLA display, which indicates when
a sweep has begun, sweep ended, and so on. By reflecting those
messages on the remote application, you provide invaluable
feedback to a user, particularly if they cannot see the PDLA
display.
When an event like a new status message occurs, the PDLA
informs you by calling a method on your object. Visual Basic
presents a list of available events in the function list. When you
select the event, it creates the function to hold your event
handling code.
above, the pdlaClient was declared using the keyword
“WithEvents”. This instructs Visual Basic to find the events and
make them available to you. Go into the code window and click
on the selector in the upper left corner (it probably says Form1
now.) It presents a list of objects you have available. Select the
pdlaClient. Now click on the selector in the upper right corner
(it probably says Declarations). It presents a list of events you
can choose to receive and write code for. If the event is in light
gray, you have not implemented it yet. If it is in bold type face,
there is code for it. You do not have to implement all the events,
just the ones you find useful.
The steps below walk through adding an event handler for
NewStatus.
1 Add a display line to show user status messages. Add a text
label as wide as the form, and call it lblStatus. Default the
text to PDLA Status.
2 Create the event function. Go to the code window. Click the
object selector in the upper left corner of the window, and
select
pdlaClient
. Now click the event method selector in the
upper right corner of the display, and click
NewStatus
. This
will take you to a function called pdlaClient_NewStatus,
which will be called when a new status message is displayed
on the PDLA. The first pass parameter is the message itself,
the second pass parameter is an enumerated type telling you
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: ......