Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1142

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

Advertisement

39
Programming Examples
End Sub
'
' Initialize the oscilloscope to a known state.
' -------------------------------------------------------------------
Private Sub Initialize()
End Sub
'
' Capture the waveform.
' -------------------------------------------------------------------
Private Sub Capture()
1142
err = viClose(drm)
' Clear the interface.
err = viClear(vi)
If Not (err = VI_SUCCESS) Then HandleVISAError vi
' Get and display the device's *IDN? string.
strQueryResult = DoQueryString("*IDN?")
MsgBox "*IDN? string: " + strQueryResult, vbOKOnly, "*IDN? Result"
' Clear status and load the default setup.
DoCommand "*CLS"
DoCommand "*RST"
' 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)
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents