Agilent Technologies 86082A User Manual page 227

Wavelength domain component analyzer
Table of Contents

Advertisement

Remote Operation
Example Programs
Do
Call Sleep(5)
DoEvents
'-- Read STB to determine when Lambda Zero is complete
Status = viReadSTB(DevSessionNum, STB)
If Status <> 0 Then GoTo ErrorHandler
'-- Check for timeout (this could take over 5 minutes)
If ((Now * 86400) - TimeStart) > (LZ_TMO) Then GoTo ErrorHandler
Loop While (STB And 8) <> 8
End If
'-- Clear the Status Byte
Status = viVPrintf(DevSessionNum, "*CLS" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
'-- Summarize Lambda Zero In Progress to the status byte (bit 7, decimal 128).
'-- This can be used later to detect if an operation timed out due to a LambdaZero
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
5-52
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
DefRM As Long, DevSessionNum As Long, _
Optional ErrMsg As String = "") As Long

Advertisement

Table of Contents
loading

Table of Contents