Agilent Technologies 86082A User Manual page 226

Wavelength domain component analyzer
Table of Contents

Advertisement

'-- Post message and reset vars
Call MsgBox(Status & vbCrLf & ErrMsg, vbOKOnly, "Error")
Status = 0
Else
'-- Non-VISA error from another function using VISA
Call MsgBox(ErrMsg, vbOKOnly, "Error")
End If
ErrMsg = ""
Else
Call MsgBox(Err.Number & vbCrLf & Err.Description, vbOKOnly, "Error")
End If
GoTo EndSession
End Sub
Private Function CheckLambdaZero(DevSessionNum As Long, Optional ErrMsg As String = "") _
As Long
'-- This function will check to see if a TLS LambdaZero is about to occur. If so, force it to
'-- happen to prevent timeouts and ensure data integrity.
'--
Dim TimeStart As Double
Dim STB As Integer
Dim Status As Long
On Error GoTo ErrorHandler
'-- Summarize Lambda Zero Pending to the status byte register (bit 7, decimal 128)
Status = viVPrintf(DevSessionNum, "STAT:OPER:ENAB 4" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
'-- Summarize Lambda Zero Complete to the status byte register (bit 3, decimal 8)
Status = viVPrintf(DevSessionNum, "STAT:QUES:ENAB 8" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
'-- Check to see if a Lambda Zero is pending
Status = viReadSTB(DevSessionNum, STB)
If Status <> 0 Then GoTo ErrorHandler
'-- If a Lambda Zero is pending, force it to occur
If (STB And 128) = 128 Then
'-- Start Lambda Zero
Status = viVPrintf(DevSessionNum, "CAL:WAV:INT" & Chr$(10), 0)
If Status <> 0 Then GoTo ErrorHandler
TimeStart = Now * 86400
'-- Wait for Lambda Zero to complete
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
'Used to track elapsed time
Remote Operation
Example Programs
5-51

Advertisement

Table of Contents
loading

Table of Contents