Agilent-technologies N5183A MXG Manual de usuario Pagina 118

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 366
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 117
108 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Programming Examples
LAN Programming Interface Examples
•error checks
queries signal generator for ID
sets frequency on signal generator to 2.5 GHz
sets power on signal generator to –5 dBm
gets option letter from argument vector and checks for end of file (EOF)
The following programming examples are available on the signal generator Documentation CD- ROM as
lanio.c and getopt.c.
/***************************************************************************
* $Header: lanio.c 04/24/01
* $Revision: 1.1 $
* $Date: 10/24/01
* PROGRAM NAME: lanio.c
*
* $Description: Functions to talk to an Agilent signal generator
* via TCP/IP. Uses command-line arguments.
*
* A TCP/IP connection to port 5025 is established and
* the resultant file descriptor is used to "talk" to the
* instrument using regular socket I/O mechanisms. $
*
*
*
* Examples:
*
* Query the signal generator frequency:
* lanio xx.xxx.xx.x 'FREQ?'
*
* Query the signal generator power level:
* lanio xx.xxx.xx.x 'POW?'
*
* Check for errors (gets one error):
* lanio xx.xxx.xx.x 'syst:err?'
*
* Send a list of commands from a file, and number them:
* cat scpi_cmds | lanio -n xx.xxx.xx.x
*
****************************************************************************
*
* This program compiles and runs under
* - HP-UX 10.20 (UNIX), using HP cc or gcc:
* + cc -Aa -O -o lanio lanio.c
* + gcc -Wall -O -o lanio lanio.c
*
Vista de pagina 117
1 2 ... 113 114 115 116 117 118 119 120 121 122 123 ... 365 366

Comentarios a estos manuales

Sin comentarios