EasyManuals Logo

Agilent Technologies InfiniiVision 5000 Series Programmer's Guide

Agilent Technologies InfiniiVision 5000 Series
788 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #739 background imageLoading...
Page #739 background image
Programming Examples 12
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide 739
' SAVE_WAVE_DATA - saves the waveform data to a CSV format
' file named "waveform.csv".
If File.Exists("c:\scope\data\waveform.csv") Then
File.Delete("c:\scope\data\waveform.csv")
End If
Dim writer As StreamWriter = _
File.CreateText("c:\scope\data\waveform.csv")
For index As Integer = 0 To 999
writer.WriteLine("{0:E}, {1:f6}", _
(CSng(index) - fXreference) * fXincrement + fXorigin, _
(CSng(ResultsArray(index)) - fYreference) * fYincrement _
+ fYorigin)
Next
writer.Close()
End Sub
End Class
Class VisaInstrument
Private m_nResourceManager As Integer
Private m_nSession As Integer
Private m_strVisaAddress As String
' Constructor.
Public Sub New(ByVal strVisaAddress As String)
' Save VISA address in member variable.
m_strVisaAddress = strVisaAddress
' Open the default VISA resource manager.
OpenResourceManager()
' Open a VISA resource session.
OpenSession()
' Clear the interface.
Dim nViStatus As Integer
nViStatus = visa32.viClear(m_nSession)
End Sub
Public Sub DoCommand(ByVal strCommand As String)
' Send the command.
VisaSendCommandOrQuery(strCommand)
' Check for instrument errors (another command and result).
CheckForInstrumentErrors(strCommand)
End Sub
Public Function DoCommandIEEEBlock(ByVal strCommand As String, _
ByVal DataArray As Byte()) As Integer
' Send the command to the device.
Dim strCommandAndLength As String
Dim nViStatus As Integer
Dim nLength As Integer
Dim nBytesWritten As Integer
nLength = DataArray.Length

Table of Contents

Other manuals for Agilent Technologies InfiniiVision 5000 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies InfiniiVision 5000 Series and is the answer not in the manual?

Agilent Technologies InfiniiVision 5000 Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelInfiniiVision 5000 Series
CategoryTest Equipment
LanguageEnglish

Related product manuals