User`s manual
#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