Agilent Technologies 86038A User Manual page 179

Optical dispersion analyzer
Table of Contents

Advertisement

Example 1: Simple Application for Controlling the ODA
Agilent 86038A Optical Dispersion Analyzer, Third Edition
if (centerWavel < 0 || centerWavel > 1700){
MessageBox.Show("Center Wavelength out of range, defaulted
to 1550 nm");
centerWavel=1550;
txtCenter.Text = centerWavel.ToString();
}
// Convert center to start, stop
startWavel=odaClient.MeasurementRange.XStart;
stopWavel=odaClient.MeasurementRange.XStop;
oldSpan=stopWavel - startWavel;
// Write new start and stop
odaClient.MeasurementRange.XStart=centerWavel - oldSpan/2;
odaClient.MeasurementRange.XStop=centerWavel + oldSpan/2;
3 It works better if you first set the ODA to a relatively narrow sweep, such as 1530
to 1540 nm.
Complete Source Code
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using Agilent.LWD.Ag86038x.InstrumentObjects;
using Agilent.LWD.Ag86038x;
namespace WindowsApplication1
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox tbOdaName;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblStatus;
// Declare a local object to communicate with the ODA
private RemoteClient.Communicator odaClient;
// Declare event handlers for ODA - you have to do them all!
private ODARemoting.NewStatusDelegate NewStatusHandler;
private ODARemoting.TriggerProgressDelegate TriggerHandler;
private System.Windows.Forms.Button pbSweep;
private System.Windows.Forms.Button pbConnect;
private System.Windows.Forms.TextBox txtCenter;
private System.Windows.Forms.Label label2;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
Remote Operation
179

Advertisement

Table of Contents
loading

Table of Contents