Agilent Technologies 86082A User Manual page 242

Wavelength domain component analyzer
Table of Contents

Advertisement

Status = viVPrintf(DevSessionNum, "STAT:OPER:ENAB 8" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
ErrMsg = ""
CheckLambdaZero = 0
Exit Function
LZ_Timeout:
ErrMsg = "Timeout while waiting for Lambda Zero to complete. Make sure Output 2 is connected" & _
" to Source Input!"
CheckLambdaZero = 0
Exit Function
ErrorHandler:
If Err.Number = 0 Then
CheckLambdaZero = Status
Else
ErrMsg = Err.Number & vbCrLf & Err.Description
CheckLambdaZero = 0
End If
End Function
Private Function InitVISASession(ByVal GPIB_IN As String, ByVal GPIB_PA As String, _
'-- VISA session variables
Dim ReadBuffer As String * 65500 'Buffer to read back data
Dim Status As Long: Status = 0
On Error GoTo ErrorHandler
'-- Create a VISA session
Status = viOpenDefaultRM(DefRM)
If Status <> 0 Then GoTo ErrorHandler
'-- Open a session to the WDCA
Status = viOpen(DefRM, "GPIB" & GPIB_IN & "::" & GPIB_PA, 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
'-- Ensure that the instrument isn't in repeat sweep mode
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
DefRM As Long, DevSessionNum As Long, _
Optional ErrMsg As String = "") As Long
Remote Operation
Example Programs
5-67

Advertisement

Table of Contents
loading

Table of Contents