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

Table of Contents

Advertisement

' Declare variables to hold numeric values returned by
' viVScanf/viVQueryf.
Public dblQueryResult As Double
Public Const ByteArraySize = 5000000
Public retCount As Long
Public byteArray(ByteArraySize) As Byte
Public paramsArray(2) As Long
Public Const DblArraySize = 20
Public dblArray(DblArraySize) As Double
' Declare fixed length string variable to hold string value returned
' by viVScanf/viVQueryf.
Public strQueryResult As String * 200
' For Sleep subroutine.
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'
' Main Program
' -------------------------------------------------------------------
Sub Main()
End Sub
'
' Initialize the oscilloscope to a known state.
' -------------------------------------------------------------------
Private Sub Initialize()
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
' Open the default resource manager session.
err = viOpenDefaultRM(drm)
If (err <> VI_SUCCESS) Then HandleVISAError drm
' Open the session using the oscilloscope's VISA address.
err = viOpen(drm, _
"USB0::2391::5970::30D3090541::0::INSTR", 0, 15000, vi)
If (err <> VI_SUCCESS) Then HandleVISAError drm
' Initialize - start from a known state.
Initialize
' Capture data.
Capture
' Analyze the captured waveform.
Analyze
' Close the vi session and the resource manager session.
err = viClose(vi)
err = viClose(drm)
' Clear the interface.
err = viClear(vi)
If Not (err = VI_SUCCESS) Then HandleVISAError vi
Programming Examples
855
12

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents