Agilent Technologies 86082A User Manual page 232

Wavelength domain component analyzer
Table of Contents

Advertisement

OPCTimeOut:
MousePointer = vbDefault
Call MsgBox("Timeout while waiting for OPC. Make sure all cables are securely fastened.", _
GoTo EndSession
ErrorHandler:
If Err.Number = 0 Then
If Status <> 0 Then
'-- VISA error
MousePointer = vbDefault
'-- Translate error number into a message
Call viStatusDesc(DevSessionNum, Status, ReadBuffer)
'-- Trim off nulls
ErrMsg = TrimVISAStr(ReadBuffer)
'-- 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)
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
vbOKOnly, "Timeout")
Remote Operation
Example Programs
5-57

Advertisement

Table of Contents
loading

Table of Contents