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

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

Advertisement

40
Programming Examples
ErrorHandler:
End Sub
1240
Put hFile, , byteArray(lngI)
Next lngI
Close hFile
' Close file.
' Change settings with individual commands:
' -----------------------------------------------------------------
' Set vertical scale and offset.
DoCommand ":CHANnel1:SCALe 0.05"
Debug.Print "Channel 1 vertical scale: " + _
DoQueryString(":CHANnel1:SCALe?")
DoCommand ":CHANnel1:OFFSet -1.5"
Debug.Print "Channel 1 vertical offset: " + _
DoQueryString(":CHANnel1:OFFSet?")
' Set horizontal scale and position.
DoCommand ":TIMebase:SCALe 0.0002"
Debug.Print "Timebase scale: " + _
DoQueryString(":TIMebase:SCALe?")
DoCommand ":TIMebase:POSition 0.0"
Debug.Print "Timebase position: " + _
DoQueryString(":TIMebase:POSition?")
' Set the acquisition type (NORMal, PEAK, AVERage, or HRESolution).
DoCommand ":ACQuire:TYPE NORMal"
Debug.Print "Acquire type: " + _
DoQueryString(":ACQuire:TYPE?")
' Or, configure by loading a previously saved setup.
' -----------------------------------------------------------------
strPath = "c:\scope\config\setup.dat"
Open strPath For Binary Access Read As hFile
Dim lngSetupFileSize As Long
lngSetupFileSize = LOF(hFile)
Get hFile, , byteArray
Close hFile
' Close file.
' Write setup string back to oscilloscope using ":SYSTem:SETup"
' command:
Dim lngRestored As Long
lngRestored = DoCommandIEEEBlock(":SYSTem:SETup", lngSetupFileSize)
Debug.Print "Setup bytes restored: " + CStr(lngRestored)
' Capture an acquisition using :DIGitize.
' -----------------------------------------------------------------
DoCommand ":DIGitize CHANnel1"
Exit Sub
MsgBox "*** Error : " + Error, vbExclamation
End
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
' Write data.
' Length of file.
' Read data.
' Open file for input.

Advertisement

Table of Contents
loading

Table of Contents