Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1022

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

Advertisement

38
Sample Programs
' Capture the waveform.
' -------------------------------------------------------------------
Private Sub Capture()
1022
On Error GoTo VisaComError
' Set probe attenuation factor.
DoCommand ":CHANnel1:PROBe 1.0"
Debug.Print "Channel 1 probe attenuation factor: " + _
DoQueryString(":CHANnel1:PROBe?")
' Use auto-scale to automatically set up oscilloscope.
' -----------------------------------------------------------------
Debug.Print "Autoscale."
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 setup.
' -----------------------------------------------------------------
varQueryResult = DoQueryIEEEBlock_UI1(":SYSTem:SETup?")
' Output setup string to a file:
Dim strPath As String
strPath = "c:\scope\config\setup.dat"
Dim hFile As Long
hFile = FreeFile
Open strPath For Binary Access Write Lock Write As hFile
Put hFile, , varQueryResult
Close hFile
' Close file.
Debug.Print "Setup bytes saved: " + CStr(LenB(varQueryResult))
' Change oscilloscope settings with individual commands:
' -----------------------------------------------------------------
' Set vertical scale and offset.
DoCommand ":CHANnel1:SCALe 0.1"
Debug.Print "Channel 1 vertical scale: " + _
DoQueryString(":CHANnel1:SCALe?")
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
' Write data.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents