Sample Calibration Program
5-40
TDS5000B Series Service Manual
TabIndex = 2
Top = 120
Width = 2052
End
End
Attribute VB_Name = ”frmMain”
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
’ $Header: $
’
’ DESCRIPTION:
’ The Calibrator is an application that runs on a PC. The PC must support
’ visual basic win32 application and provide a TekVisa supported GPIB connection
’ to the WaveTek 9500 as well as the TDS5000B instrument. The Calibrator will allow
’ the user to control both of these devices to achieve ”Factory Calibration” of the
’ TDS5000B. There will be no validation of the accuracy of the calibration preformed
’ (no PV). The GPIB interface hardware in the PC has to be able to act as a GPIB
’ controller.
’
’
’ Original Author: Tektronix, Inc.
Option Explicit
Dim strEndOfCal As String ’ The token string produced by tekScope when
’ calibration is finished
Dim devFound As Boolean ’ Has the GPIB devices been found before?
Dim calInitDone As Boolean ’ Has the tekScope been told that we are going
’ to do factory calibration?
Dim calPassedLastStep As Boolean ’ use to allow one retry on a cal step
Dim srcGrounded As Boolean ’ tracks if the WaveTek is set in Ground mode
Dim reqVolts As Double ’ voltage needed for the next step
Dim reqChannel As Integer ’ channel needed for the next step
Dim reqFreq As Double ’ frequency needed for the next step
Dim reqTermination As Double ’ termination in Ohms needed for the next step
Dim reqStepName As String ’ name of the next step
Dim stepNumber As Integer ’ cal step number
Dim calFailed As Boolean ’ did calibration fail?
’ Subroutine to scan for the devices needed.
’ tekScope and waveTek devices should be found or we won’t be able to complete
’ calibration of the oscilloscope.
Private Sub findDevices()
Dim i As Integer
Dim dev As Variant
Dim strResult As String
Dim strGPIBtekscope As String ’ name of tekScope GPIB connection
Dim strGPIBwavetek As String ’ name of WaveTek GPIB connection