Example 2, User Calibration - Agilent Technologies 86082A User Manual

Wavelength domain component analyzer
Table of Contents

Advertisement

Example 2, User Calibration

Description
A noticeable change in temperature will cause the WDCA to perform a
wavelength calibration. However, there may be times in which it is important
to perform a calibration before testing a device. This Visual Basic program
demonstrates how to perform a wavelength calibration.
Program
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Const OPC_TMO = 180
Private Const LZ_TMO = 360
Private Sub cmdCalibration_Click()
Dim TimeStart As Double
'-- VISA session variables
Dim DefRM As Long
Dim DevSessionNum As Long
Dim ReadBuffer As String * 65500
Dim STB As Integer
Dim Status As Long: Status = 0
Dim ErrMsg As String: ErrMsg = ""
On Error GoTo ErrorHandler
Call MsgBox("Connect Output 2 of the TLS to the Source Input", vbOKOnly)
MousePointer = vbHourglass
'-- Create a VISA session
Status = viOpenDefaultRM(DefRM)
If Status <> 0 Then GoTo ErrorHandler
'-- Open a session to the WDCA
Status = viOpen(DefRM, "GPIB" & txtGPIB_IN.Text & "::" & txtGPIB_PA.Text, 0, 0, DevSessionNum)
If Status <> 0 Then GoTo ErrorHandler
'-- Clear the instrument
Status = viClear(DevSessionNum)
If Status <> 0 Then GoTo ErrorHandler
'-- Set write buffer to flush on access
Status = viSetAttribute(DevSessionNum, VI_ATTR_WR_BUF_OPER_MODE, VI_FLUSH_ON_ACCESS)
If Status <> 0 Then GoTo ErrorHandler
'-- Set read buffer to flush on access
Status = viSetAttribute(DevSessionNum, VI_ATTR_RD_BUF_OPER_MODE, VI_FLUSH_ON_ACCESS)
If Status <> 0 Then GoTo ErrorHandler
'-- Clear status registers
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Remote Operation
Example Programs
'VISA session
'VISA session to device
'Buffer to read back data
'Status byte
5-39

Advertisement

Table of Contents
loading

Table of Contents