Agilent Technologies InfiniiVision 7000A Series Programmer's Manual page 902

Table of Contents

Advertisement

12
Programming Examples
' -------------------------------------------------------------------
Private Sub Initialize()
ErrorHandler:
End Sub
'
' Capture the waveform.
' -------------------------------------------------------------------
Private Sub Capture()
902
On Error GoTo ErrorHandler
' Clear the interface.
Call iclear(id)
' Get and display the device's *IDN? string.
strQueryResult = DoQueryString("*IDN?")
MsgBox "Result is: " + RTrim(strQueryResult), vbOKOnly, "*IDN? Result"
' Clear status and load the default setup.
DoCommand "*CLS"
DoCommand "*RST"
Exit Sub
MsgBox "*** Error : " + Error, vbExclamation
End
On Error GoTo ErrorHandler
' Use auto-scale to automatically configure oscilloscope.
' -----------------------------------------------------------------
DoCommand ":AUToscale"
' 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"
' 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.
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
' Write data.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents