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

Table of Contents

Advertisement

Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
}
public void DoCommand(string strCommand)
{
// Send the command.
VisaSendCommandOrQuery(strCommand);
// Check for instrument errors (another command and result).
CheckForInstrumentErrors(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{1:D8}",
strCommand, nLength);
// Write first part of command to formatted I/O write buffer.
nViStatus = visa32.viPrintf(m_nSession, strCommandAndLength);
CheckVisaStatus(nViStatus);
// Write the data to the formatted I/O write buffer.
nViStatus = visa32.viBufWrite(m_nSession, DataArray, nLength,
out nBytesWritten);
CheckVisaStatus(nViStatus);
// Write command termination character.
nViStatus = visa32.viPrintf(m_nSession, "\n");
CheckVisaStatus(nViStatus);
// Check for instrument errors (another command and result).
CheckForInstrumentErrors(strCommand);
return nBytesWritten;
}
public StringBuilder DoQueryString(string strQuery)
{
// Send the query.
VisaSendCommandOrQuery(strQuery);
// Get the result string.
StringBuilder strResults = new StringBuilder(1000);
strResults = VisaGetResultString();
// Check for instrument errors (another command and result).
CheckForInstrumentErrors(strQuery);
// Return string results.
return strResults;
}
Programming Examples
873
12

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents