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

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

Advertisement

ErrorHandler:
End Sub
'
' Capture the waveform.
' -------------------------------------------------------------------
Private Sub Capture()
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
MsgBox "*** Error : " + Error, vbExclamation
End
On Error GoTo ErrorHandler
' Use auto-scale to automatically configure oscilloscope.
' -----------------------------------------------------------------
DoCommand ":AUToscale"
' Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
DoCommand ":TRIGger:MODE EDGE"
Debug.Print "Trigger mode: " + _
DoQueryString(":TRIGger:MODE?")
' Set EDGE trigger parameters.
DoCommand ":TRIGger:EDGE:SOURCe CHANnel1"
Debug.Print "Trigger edge source: " + _
DoQueryString(":TRIGger:EDGE:SOURce?")
DoCommand ":TRIGger:EDGE:LEVel 1.5"
Debug.Print "Trigger edge level: " + _
DoQueryString(":TRIGger:EDGE:LEVel?")
DoCommand ":TRIGger:EDGE:SLOPe POSitive"
Debug.Print "Trigger edge slope: " + _
DoQueryString(":TRIGger:EDGE:SLOPe?")
' Save oscilloscope configuration.
' -----------------------------------------------------------------
Dim lngSetupStringSize As Long
lngSetupStringSize = DoQueryIEEEBlock_Bytes(":SYSTem:SETup?")
Debug.Print "Setup bytes saved: " + CStr(lngSetupStringSize)
' Output setup string to a file:
Dim strPath As String
strPath = "c:\scope\config\setup.dat"
If Len(Dir(strPath)) Then
Kill strPath
' Remove file if it exists.
End If
' Open file for output.
Dim hFile As Long
hFile = FreeFile
Open strPath For Binary Access Write Lock Write As hFile
Dim lngI As Long
For lngI = 0 To lngSetupStringSize - 1
Programming Examples
1239
40

Advertisement

Table of Contents
loading

Table of Contents