Agilent Technologies InfiniiVision 6000 Series Servisní příručka Strana 867

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 934
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 866
Programming Examples 12
Agilent InfiniiVision 6000 Series Oscilloscopes Programmer's Guide 867
' 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::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)
End Sub
'
' Initialize the oscilloscope to a known state.
' -------------------------------------------------------------------
Private Sub Initialize()
' Clear the interface.
err = viClear(vi)
If Not (err = VI_SUCCESS) Then HandleVISAError vi
Zobrazit stránku 866
1 2 ... 862 863 864 865 866 867 868 869 870 871 872 ... 933 934

Komentáře k této Příručce

Žádné komentáře