Agilent Technologies InfiniiVision 3000 DSO-X 3054A Servisní příručka Strana 934

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 970
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 933
934 Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
37 Programming Examples
' Return string results.
Return strResults
End Function
Public Function DoQueryNumber(ByVal strQuery As String) As Double
' Send the query.
VisaSendCommandOrQuery(strQuery)
' Get the result string.
Dim fResults As Double
fResults = VisaGetResultNumber()
' Check for inst errors.
CheckInstrumentErrors(strQuery)
' Return string results.
Return fResults
End Function
Public Function DoQueryNumbers(ByVal strQuery As String) _
As Double()
' Send the query.
VisaSendCommandOrQuery(strQuery)
' Get the result string.
Dim fResultsArray As Double()
fResultsArray = VisaGetResultNumbers()
' Check for instrument errors (another command and result).
CheckInstrumentErrors(strQuery)
' Return string results.
Return fResultsArray
End Function
Public Function DoQueryIEEEBlock(ByVal strQuery As String, _
ByRef ResultsArray As Byte()) As Integer
' Send the query.
VisaSendCommandOrQuery(strQuery)
' Get the result string.
System.Threading.Thread.Sleep(2000) ' Delay before reading data.
Dim length As Integer
' Number of bytes returned from instrument.
length = VisaGetResultIEEEBlock(ResultsArray)
' Check for inst errors.
CheckInstrumentErrors(strQuery)
' Return string results.
Return length
End Function
Private Sub VisaSendCommandOrQuery(ByVal strCommandOrQuery _
As String)
' Send command or query to the device.
Zobrazit stránku 933
1 2 ... 929 930 931 932 933 934 935 936 937 938 939 ... 969 970

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

Žádné komentáře