Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 174

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

5
Commands by Subsystem
Public varQueryResult As Variant
Public strQueryResult As String
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Main()
174
On Error GoTo VisaComError
' Create the VISA COM I/O resource.
Set myMgr = New VisaComLib.ResourceManager
Set myScope = New VisaComLib.FormattedIO488
Set myScope.IO = myMgr.Open("TCPIP0::130.29.70.228::inst0::INSTR")
myScope.IO.Clear
' Clear the interface.
' Turn on segmented memory acquisition mode.
myScope.WriteString ":ACQuire:MODE SEGMented"
myScope.WriteString ":ACQuire:MODE?"
strQueryResult = myScope.ReadString
Debug.Print "Acquisition mode: " + strQueryResult
' Set the number of segments to 50.
myScope.WriteString ":ACQuire:SEGMented:COUNt 50"
myScope.WriteString ":ACQuire:SEGMented:COUNt?"
strQueryResult = myScope.ReadString
Debug.Print "Acquisition memory segments: " + strQueryResult
' If data will be acquired within the IO timeout:
'myScope.IO.Timeout = 10000
'myScope.WriteString ":DIGitize"
'Debug.Print ":DIGitize blocks until all segments acquired."
'myScope.WriteString ":WAVeform:SEGMented:COUNt?"
'varQueryResult = myScope.ReadNumber
' Or, to poll until the desired number of segments acquired:
myScope.WriteString ":SINGle"
Debug.Print ":SINGle does not block until all segments acquired."
Do
Sleep 100
' Small wait to prevent excessive queries.
myScope.WriteString ":WAVeform:SEGMented:COUNt?"
varQueryResult = myScope.ReadNumber
Loop Until varQueryResult = 50
Debug.Print "Number of segments in acquired data: " _
+ FormatNumber(varQueryResult)
Dim lngSegments As Long
lngSegments = varQueryResult
' For each segment:
Dim dblTimeTag As Double
Dim lngI As Long
For lngI = lngSegments To 1 Step -1
' Set the segmented memory index.
myScope.WriteString ":ACQuire:SEGMented:INDex " + CStr(lngI)
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents