Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 774

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

12
Programming Examples
774
' Constructor.
Public Sub New(ByVal strVisaAddress As String)
' Save VISA address in member variable.
m_strVisaAddress = strVisaAddress
' Open the default VISA COM IO object.
OpenIo()
' Clear the interface.
m_IoObject.IO.Clear()
End Sub
Public Sub DoCommand(ByVal strCommand As String)
' Send the command.
m_IoObject.WriteString(strCommand, True)
' Check for instrument errors.
CheckForInstrumentErrors(strCommand)
End Sub
Public Function DoQueryString(ByVal strQuery As String) As String
' Send the query.
m_IoObject.WriteString(strQuery, True)
' Get the result string.
Dim strResults As String
strResults = m_IoObject.ReadString()
' Check for instrument errors.
CheckForInstrumentErrors(strQuery)
' Return results string.
Return strResults
End Function
Public Function DoQueryValue(ByVal strQuery As String) As Double
' Send the query.
m_IoObject.WriteString(strQuery, True)
' Get the result number.
Dim fResult As Double
fResult = _
CDbl(m_IoObject.ReadNumber(IEEEASCIIType.ASCIIType_R8, True))
' Check for instrument errors.
CheckForInstrumentErrors(strQuery)
' Return result number.
Return fResult
End Function
Public Function DoQueryValues(ByVal strQuery As String) As Double()
' Send the query.
m_IoObject.WriteString(strQuery, True)
' Get the result numbers.
Dim fResultsArray As Double()
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents