Example 3, Normalization - Agilent Technologies 86082A User Manual

Wavelength domain component analyzer
Table of Contents

Advertisement

Remote Operation
Example Programs

Example 3, Normalization

Description
Normalization should be performed to ensure quality characterization of a
DUT. This Visual Basic program demonstrates how to perform normalization
remotely.
Program
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Const OPC_TMO = 180
Private Const LZ_TMO = 360
Private Sub cmdStart_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
'-- Prompt user to make the proper connection
If MsgBox("Connect Output 1 to Input " & cmbInput.Text & "." & vbCrLf & "Press OK to continue.", _
MousePointer = vbHourglass
'-- Call function to initialize a VISA session to the WDCA
Status = InitVISASession(txtGPIB_IN.Text, txtGPIB_PA.Text, DefRM, DevSessionNum, ErrMsg)
If Status <> 0 Or ErrMsg <> "" Then GoTo ErrorHandler
'-- Wavelength Start
Status = viVPrintf(DevSessionNum, "SENS:NORM:WAV:START " & Val(txtWavelengthStart.Text) _
If Status <> 0 Then GoTo ErrorHandler
'-- Wavelength Stop
Status = viVPrintf(DevSessionNum, "SENS:NORM:WAV:STOP " & Val(txtWavelengthStop.Text) & _
If Status <> 0 Then GoTo ErrorHandler
'-- Trace settings
'-- Attach trace to input
Status = viVPrintf(DevSessionNum, "TRAC:FEED:INP " & cmbTrace.Text & "," & cmbInput.Text & _
If Status <> 0 Then GoTo ErrorHandler
'-- Turn trace update on
5-42
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
vbOKCancel, "Make connection") = vbCancel Then Exit Sub
& "nm" & Chr$(10), 0)
"nm" & Chr$(10), 0)
Chr$(10), 0)
'VISA session
'VISA session to device
'Buffer to read back data
'Status byte

Advertisement

Table of Contents
loading

Table of Contents