Agilent Technologies FS2010 Guía de usuario Pagina 105

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 160
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 104
Programming via GPIB and VXI 4
Agilent VISA User’s Guide 105
High-Level Memory Functions: Sample Programs
Two sample programs follow that use the high- level memory
functions to read the ID and Device Type registers of a
device at the VXI logical address 24. The contents of the
registers are then printed out.
The first program uses the VXI interface; the second
program accesses the backplane with the GPIB- VXI interface.
These two programs are identical except for the string
passed to viOpen.
Sample: Using VXI Interface (High-Level) Memory Functions
This program uses high- level memory functions and the VXI
interface to read the ID and Device Type registers of a
device at VXI0::24.
/* vxihl.c
This example program uses the high-level memory
functions to read the id and device type
registers of the device at VXI0::24. Change this
address if necessary. The register contents are
then displayed.*/
#include <visa.h>
#include <stdlib.h>
#include <stdio.h>
void main () {
ViSession defaultRM, dmm;
unsigned short id_reg, devtype_reg;
/* Open session to VXI device at address 24 */
viOpenDefaultRM(&defaultRM);
viOpen(defaultRM, "VXI0::24::INSTR", VI_NULL,
VI_NULL, &dmm);
/* Read instrument id register contents */
viIn16(dmm, VI_A16_SPACE, 0x00, &id_reg);
Vista de pagina 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 159 160

Comentarios a estos manuales

Sin comentarios