Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1121

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

' -------------------------------------------------------------------
Private Sub Capture()
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
On Error GoTo ErrorHandler
' Set probe attenuation factor.
DoCommand ":CHANnel1:PROBe 1.0"
Debug.Print "Channel 1 probe attenuation factor: " + _
DoQueryString(":CHANnel1:PROBe?")
' Use auto-scale to automatically configure oscilloscope.
' -----------------------------------------------------------------
DoCommand ":AUToscale"
' Set trigger mode.
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:LEVel CHANnel1,-2E-3"
Debug.Print "Trigger level, channel 1: " + _
DoQueryString(":TRIGger:LEVel? CHANnel1")
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
Put hFile, , byteArray(lngI)
Next lngI
Close hFile
' Close file.
' Change settings with individual commands:
' Write data.
38
Sample Programs
1121

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents