Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 653

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

VisaComError:
End Sub
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
' -----------------------------------------------------------------
' Start a single acquisition.
myScope.WriteString ":SINGle"
' Wait until the trigger system is armed.
Do
Sleep 100
' Small wait to prevent excessive queries.
myScope.WriteString ":AER?"
varQueryResult = myScope.ReadNumber
Loop Until varQueryResult = 1
' Oscilloscope is armed and ready, enable DUT here.
Debug.Print "Oscilloscope is armed and ready, enable DUT."
' Now, look for RUN bit = stopped (acquisition complete).
Dim lngTimeout As Long
Dim lngElapsed As Long
lngTimeout = 10000
lngElapsed = 0
Do While lngElapsed <= lngTimeout
myScope.WriteString ":OPERegister:CONDition?"
varQueryResult = myScope.ReadNumber
' Mask 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 results.
' -----------------------------------------------------------------
If lngElapsed < lngTimeout Then
myScope.WriteString ":MEASure:RISetime"
myScope.WriteString ":MEASure:RISetime?"
varQueryResult = myScope.ReadNumber
Debug.Print "Risetime: " + _
FormatNumber(varQueryResult * 1000000000, 1) + " ns"
Else
Debug.Print "Timeout waiting for single-shot trigger."
End If
Exit Sub
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
' Max millisecs to wait for single-shot.
' 10 seconds.
' Read risetime.
Synchronizing Acquisitions
10
653

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents