Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1158

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

Advertisement

39
Programming Examples
1158
CheckInstrumentErrors(strQuery);
// Return string results.
return fResultsArray;
}
public int DoQueryIEEEBlock(string strQuery,
out byte[] ResultsArray)
{
// Send the query.
VisaSendCommandOrQuery(strQuery);
// Get the result string.
int length;
// Number of bytes returned from instrument.
length = VisaGetResultIEEEBlock(out ResultsArray);
// Check for inst errors.
CheckInstrumentErrors(strQuery);
// Return string results.
return length;
}
private void VisaSendCommandOrQuery(string strCommandOrQuery)
{
// Send command or query to the device.
string strWithNewline;
strWithNewline = String.Format("{0}\n", strCommandOrQuery);
int nViStatus;
nViStatus = visa32.viPrintf(m_nSession, strWithNewline);
CheckVisaStatus(nViStatus);
}
private StringBuilder VisaGetResultString()
{
StringBuilder strResults = new StringBuilder(1000);
// Read return value string from the device.
int nViStatus;
nViStatus = visa32.viScanf(m_nSession, "%1000t", strResults);
CheckVisaStatus(nViStatus);
return strResults;
}
private double VisaGetResultNumber()
{
double fResults = 0;
// Read return value string from the device.
int nViStatus;
nViStatus = visa32.viScanf(m_nSession, "%lf", out fResults);
CheckVisaStatus(nViStatus);
return fResults;
}
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents