Agilent-technologies N5183A MXG Manual do Utilizador Página 139

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 366
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 138
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 129
Programming Examples
LAN Programming Interface Examples
new OutputStreamWriter(t.getOutputStream()));
BufferedReader in =
new BufferedReader(
new InputStreamReader(t.getInputStream()));
System.out.println("Setting frequency to 1 GHz...");
out.write("freq 1GHz\n"); // Sets frequency
out.flush();
System.out.println("Waiting for source to settle...");
out.write("*opc?\n"); // Waits for completion
out.flush();
String opcResponse = in.readLine();
if (!opcResponse.equals("1"))
{
System.err.println("Invalid response to '*OPC?'!");
System.exit(1);
}
System.out.println("Retrieving instrument ID...");
out.write("*idn?\n"); // Querys the id string
out.flush();
String idnResponse = in.readLine(); // Reads the id string
// Prints the id string
System.out.println("Instrument ID: " + idnResponse);
}
catch (IOException e)
{
System.out.println("Error" + e);
}
}
}
Vista de página 138
1 2 ... 134 135 136 137 138 139 140 141 142 143 144 ... 365 366

Comentários a estes Manuais

Sem comentários