Agilent Technologies InfiniiVision 7000A Series Programmer's Manual page 874

Table of Contents

Advertisement

12
Programming Examples
874
public double DoQueryValue(string strQuery)
{
// Send the query.
VisaSendCommandOrQuery(strQuery);
// Get the result string.
double fResults;
fResults = VisaGetResultValue();
// Check for instrument errors (another command and result).
CheckForInstrumentErrors(strQuery);
// Return string results.
return fResults;
}
public double[] DoQueryValues(string strQuery)
{
// Send the query.
VisaSendCommandOrQuery(strQuery);
// Get the result string.
double[] fResultsArray;
fResultsArray = VisaGetResultValues();
// Check for instrument errors (another command and result).
CheckForInstrumentErrors(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 instrument errors (another command and result).
CheckForInstrumentErrors(strQuery);
// Return string results.
return length;
}
private void CheckForInstrumentErrors(string strCommand)
{
// Check for instrument errors.
StringBuilder strInstrumentError = new StringBuilder(1000);
bool bFirstError = true;
do
{
VisaSendCommandOrQuery(":SYSTem:ERRor?");
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents