Agilent Technologies InfiniiVision 3000 DSO-X 3054A Manual de servicio Pagina 907

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 970
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 906
Programming Examples 37
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide 907
' features of your Agilent oscilloscope.
' -------------------------------------------------------------------
Option Explicit
Public err As Long ' Error returned by VISA function calls.
Public drm As Long ' Session to Default Resource Manager.
Public vi As Long ' Session to instrument.
' 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()
' 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::0x0957::0x17A6::US50210029::0::INSTR", 0, 15000, vi)
If (err <> VI_SUCCESS) Then HandleVISAError drm
' Set the I/O timeout to ten seconds.
err = viSetAttribute(vi, VI_ATTR_TMO_VALUE, 10000)
If (err <> VI_SUCCESS) Then HandleVISAError vi
' 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)
Vista de pagina 906
1 2 ... 902 903 904 905 906 907 908 909 910 911 912 ... 969 970

Comentarios a estos manuales

Sin comentarios