Agilent Technologies InfiniiVision 3000 X-Series Programmer's Manual page 493

Oscilloscopes
Hide thumbs Also See for InfiniiVision 3000 X-Series:
Table of Contents

Advertisement

VisaComError:
End Sub
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
myScope.WriteString ":MTESt:AMASk:CREate"
Debug.Print "Auto-mask created, mask test automatically enabled."
' Set up timeout variables.
Dim lngTimeout As Long
Dim lngElapsed As Long
lngTimeout = 60000
' Wait until mask is created.
lngElapsed = 0
Do While lngElapsed <= lngTimeout
myScope.WriteString ":OPERegister:CONDition?"
varQueryResult = myScope.ReadNumber
' Operation Status Condition Register MTE bit (bit 9, &H200).
If (varQueryResult And &H200) <> 0 Then
Exit Do
Else
Sleep 100
' Small wait to prevent excessive queries.
lngElapsed = lngElapsed + 100
End If
Loop
' Look for RUN bit = stopped (mask test termination).
lngElapsed = 0
Do While lngElapsed <= lngTimeout
myScope.WriteString ":OPERegister:CONDition?"
varQueryResult = myScope.ReadNumber
' Operation Status Condition Register RUN bit (bit 3, &H8).
If (varQueryResult And &H8) = 0 Then
Exit Do
Else
Sleep 100
' Small wait to prevent excessive queries.
lngElapsed = lngElapsed + 100
End If
Loop
' Get total waveforms, failed waveforms, and test time.
myScope.WriteString ":MTESt:COUNt:WAVeforms?"
strQueryResult = myScope.ReadString
Debug.Print "Mask test total waveforms: " + strQueryResult
myScope.WriteString ":MTESt:COUNt:FWAVeforms?"
strQueryResult = myScope.ReadString
Debug.Print "Mask test failed waveforms: " + strQueryResult
myScope.WriteString ":MTESt:COUNt:TIME?"
strQueryResult = myScope.ReadString
Debug.Print "Mask test elapsed seconds: " + strQueryResult
Exit Sub
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
' Max millisecs to wait.
' 60 seconds.
22
:MTESt Commands
493

Advertisement

Table of Contents
loading

Table of Contents