Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1156

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

39
Programming Examples
1156
for (int i = 0; i < nLength - 1; i++)
writer.WriteLine("{0:f9}, {1:f6}",
fXorigin + ((float)i * fXincrement),
(((float)ResultsArray[i] - fYreference) *
fYincrement) + fYorigin);
// Close output file.
writer.Close();
Console.WriteLine("Waveform format BYTE data written to {0}",
strPath);
}
}
class VisaInstrument
{
private int m_nResourceManager;
private int m_nSession;
private string m_strVisaAddress;
// Constructor.
public VisaInstrument(string strVisaAddress)
{
// Save VISA addres in member variable.
m_strVisaAddress = strVisaAddress;
// Open the default VISA resource manager.
OpenResourceManager();
// Open a VISA resource session.
OpenSession();
// Clear the interface.
int nViStatus;
nViStatus = visa32.viClear(m_nSession);
}
public void DoCommand(string strCommand)
{
// Send the command.
VisaSendCommandOrQuery(strCommand);
// Check for inst errors.
CheckInstrumentErrors(strCommand);
}
public int DoCommandIEEEBlock(string strCommand,
byte[] DataArray)
{
// Send the command to the device.
string strCommandAndLength;
int nViStatus, nLength, nBytesWritten;
nLength = DataArray.Length;
strCommandAndLength = String.Format("{0} #8%08d",
strCommand);
// Write first part of command to formatted I/O write buffer.
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents