Agilent Technologies 86038A User Manual page 158

Optical dispersion analyzer
Table of Contents

Advertisement

Remote Operation
158
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 caption to "ODA 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 odaClient. Now click the event
method selector in the upper right corner of the display, and select NewStatus.
This will take you to a function called odaClient_NewStatus, that will be
called when a new status message is displayed on the ODA. The first pass
parameter is the message itself, the second pass parameter is an enumerated
type telling you if the message was an error, informational, or a warning. To
display the status, insert the following line inside odaClient_NewStatus:
lblStatus.Caption = Message
3 Click the Run button, and connect to the ODA. The first message you will see is
the Client connected message. Press Local on the ODA and take a sweep. You
will see the progress messages appearing on the application as the
measurement progresses. When you exit the application, it will release the ODA.
All of the ODA events follow a similar pattern. The most useful events are
TriggerProgress, which tells you when a measurement or normalization is
complete, and TLSSettlingProbability, which warns you how long until the
laser needs to perform a temperature settling.
Take Sweep and Transfer Data
In this exercise, you will trigger a sweep from your application, and when
the sweep completes, transfer the data across and save it in a file. This
consists of adding a button to trigger the sweep, and adding an event
handler for the TriggerProgress event, to detect when the sweep is
finished and save the data in C:\mydata.txt.
Example 1: Simple Application for Controlling the ODA
Agilent 86038A Optical Dispersion Analyzer, Third Edition
"
.

Advertisement

Table of Contents
loading

Table of Contents