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

Table of Contents

Advertisement

Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
strInstrumentError = VisaGetResultString();
if (strInstrumentError.ToString() != "+0,\"No error\"\n")
{
if (bFirstError)
{
Console.WriteLine("ERROR(s) for command '{0}': ",
strCommand);
bFirstError = false;
}
Console.Write(strInstrumentError);
}
} while (strInstrumentError.ToString() != "+0,\"No error\"\n");
}
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 VisaGetResultValue()
{
double fResults = 0;
// Read return value string from the device.
int nViStatus;
nViStatus = visa32.viScanf(m_nSession, "%lf", out fResults);
CheckVisaStatus(nViStatus);
return fResults;
}
private double[] VisaGetResultValues()
{
double[] fResultsArray;
fResultsArray = new double[10];
// Read return value string from the device.
int nViStatus;
nViStatus = visa32.viScanf(m_nSession, "%,10lf\n",
Programming Examples
875
12

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents