Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1113

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

Advertisement

Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
class VisaComInstrument
{
private ResourceManagerClass m_ResourceManager;
private FormattedIO488Class m_IoObject;
private string m_strVisaAddress;
// Constructor.
public VisaComInstrument(string strVisaAddress)
{
// Save VISA addres in member variable.
m_strVisaAddress = strVisaAddress;
// Open the default VISA COM IO object.
OpenIo();
// Clear the interface.
m_IoObject.IO.Clear();
}
public void DoCommand(string strCommand)
{
// Send the command.
m_IoObject.WriteString(strCommand, true);
// Check for inst errors.
CheckInstrumentErrors(strCommand);
}
public void DoCommandIEEEBlock(string strCommand,
byte[] DataArray)
{
// Send the command to the device.
m_IoObject.WriteIEEEBlock(strCommand, DataArray, true);
// Check for inst errors.
CheckInstrumentErrors(strCommand);
}
public string DoQueryString(string strQuery)
{
// Send the query.
m_IoObject.WriteString(strQuery, true);
// Get the result string.
string strResults;
strResults = m_IoObject.ReadString();
// Check for inst errors.
CheckInstrumentErrors(strQuery);
// Return results string.
return strResults;
}
public double DoQueryNumber(string strQuery)
{
Programming Examples
1113
39

Advertisement

Table of Contents
loading

Table of Contents