
92
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.
/* 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);
/* Read instrument id register contents */
viIn16(dmm, VI_A16_SPACE, 0x00, &id_reg);
/* Read device type register contents */
viIn16(dmm, VI_A16_SPACE, 0x02,
&devtype_reg);
Содержание E2094S
Страница 6: ...6 Agilent VISA User s Guide ...
Страница 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Страница 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Страница 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...
Страница 144: ...144 Agilent VISA User s Guide Glossary ...