Agilent Technologies InfiniiVision 6000 Series Manual de Serviço Página 899

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 934
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 898
Programming Examples 12
Agilent InfiniiVision 6000 Series Oscilloscopes Programmer's Guide 899
Dim fResults As Double
fResults = VisaGetResultValue()
' Check for instrument errors (another command and result).
CheckForInstrumentErrors(strQuery)
' Return string results.
Return fResults
End Function
Public Function DoQueryValues(ByVal strQuery As String) As Double()
' Send the query.
VisaSendCommandOrQuery(strQuery)
' Get the result string.
Dim fResultsArray As Double()
fResultsArray = VisaGetResultValues()
' Check for instrument errors (another command and result).
CheckForInstrumentErrors(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.
Dim length As Integer
' Number of bytes returned from instrument.
length = VisaGetResultIEEEBlock(ResultsArray)
' Check for instrument errors (another command and result).
CheckForInstrumentErrors(strQuery)
' Return string results.
Return length
End Function
Private Sub CheckForInstrumentErrors(ByVal strCommand As String)
' Check for instrument errors.
Dim strInstrumentError As New StringBuilder(1000)
Dim bFirstError As Boolean = True
Do
VisaSendCommandOrQuery(":SYSTem:ERRor?")
strInstrumentError = VisaGetResultString()
If strInstrumentError.ToString() <> _
"+0,""No error""" & Chr(10) & "" Then
If bFirstError Then
Console.WriteLine("ERROR(s) for command '{0}': ", _
strCommand)
bFirstError = False
End If
Vista de página 898
1 2 ... 894 895 896 897 898 899 900 901 902 903 904 ... 933 934

Comentários a estes Manuais

Sem comentários