Agilent Technologies FS2010 Guia do Utilizador Página 106

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 160
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 105
106 Agilent VISA User’s Guide
4 Programming via GPIB and VXI
Sample: Using GPIB-VXI Interface (High-Level) Memory
Functions
This program uses high- level memory functions and the
GPIB- VXI interface to read the ID and Device Type registers
of a device at GPIB- VXI0::24.
/* Read device type register contents */
viIn16(dmm, VI_A16_SPACE, 0x02,
&devtype_reg);
/* Print results */
printf ("ID Register = 0x%4X\n", id_reg);
printf ("Device Type Register = 0x%4X\n",
devtype_reg);
/* Close sessions */
viClose(dmm);
viClose(defaultRM);
}
/*gpibvxih.c
This example program uses the high-level memory
functions to read the id and device type
registers of the device at GPIB-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, "GPIB-VXI0::24::INSTR",
VI_NULL,VI_NULL, &dmm);
Vista de página 105
1 2 ... 101 102 103 104 105 106 107 108 109 110 111 ... 159 160

Comentários a estes Manuais

Sem comentários