Agilent Technologies C-Size VXIbus Systems Manual de usuario Pagina 145

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 178
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 144
#include <stdio.h>
#include <sicl.h>
#define SICL_NULL (INST) 0
INST instrument;
int main(void)
{
char result[100];
instrument = iopen("hpib,9,3");
if (instrument == SICL_NULL)
{
printf("Error opening logical address\n");
exit(1);
}
ipromptf(instrument, "*RST;*IDN?\n", "%t", result);
/* eliminate line feed from string */
result[strlen(result) - 1] = ’\0’;
printf("*IDN? returned: %s\n", result);
iclose(instrument);
exit(0);
}
COMM1D : C-SCPI
Addressing
In systems using Compiled SCPI (C-SCPI), the VXI instrument logical
address is used to open a communication channel between the computer and
the instrument. For example,
INST_OPEN(vm,"vxi,24");
opens a communication channel between the computer and the instrument
(voltmeter) at logical address 24.
Sending the *IDN?
Command
The following C-SCPI program sends the *IDN? command to the
Agilent E1411B multimeter to verify communication between the computer
and the VXI mainframe. As an example, execution of the *IDN? command
may return:
HEWLETT-PACKARD,E1411B,0,B.05.00
C-Size Configuration Guide System Programming and Debugging 6-5
Vista de pagina 144
1 2 ... 140 141 142 143 144 145 146 147 148 149 150 ... 177 178

Comentarios a estos manuales

Sin comentarios