Agilent Technologies InfiniiVision 3000 DSO-X 3054A Manual de servicio Pagina 925

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 970
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 924
Programming Examples 37
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide 925
{
double[] fResultsArray;
fResultsArray = new double[10];
// Read return value string from the device.
int nViStatus;
nViStatus = visa32.viScanf(m_nSession, "%,10lf\n",
fResultsArray);
CheckVisaStatus(nViStatus);
return fResultsArray;
}
private int VisaGetResultIEEEBlock(out byte[] ResultsArray)
{
// Results array, big enough to hold a PNG.
ResultsArray = new byte[300000];
int length; // Number of bytes returned from instrument.
// Set the default number of bytes that will be contained in
// the ResultsArray to 300,000 (300kB).
length = 300000;
// Read return value string from the device.
int nViStatus;
nViStatus = visa32.viScanf(m_nSession, "%#b", ref length,
ResultsArray);
CheckVisaStatus(nViStatus);
// Write and read buffers need to be flushed after IEEE block?
nViStatus = visa32.viFlush(m_nSession, visa32.VI_WRITE_BUF);
CheckVisaStatus(nViStatus);
nViStatus = visa32.viFlush(m_nSession, visa32.VI_READ_BUF);
CheckVisaStatus(nViStatus);
return length;
}
private void CheckInstrumentErrors(string strCommand)
{
// Check for instrument errors.
StringBuilder strInstrumentError = new StringBuilder(1000);
bool bFirstError = true;
do // While not "0,No error"
{
VisaSendCommandOrQuery(":SYSTem:ERRor?");
strInstrumentError = VisaGetResultString();
if (!strInstrumentError.ToString().StartsWith("+0,"))
{
if (bFirstError)
{
Console.WriteLine("ERROR(s) for command '{0}': ",
strCommand);
bFirstError = false;
Vista de pagina 924
1 2 ... 920 921 922 923 924 925 926 927 928 929 930 ... 969 970

Comentarios a estos manuales

Sin comentarios