
Programming via GPIB and VXI
4
Agilent VISA User’s Guide
99
/* Open session to VXI device at address 24 */
viOpenDefaultRM(&defaultRM);
viOpen(defaultRM, "GPIB-VXI0::24::INSTR",
VI_NULL,
VI_NULL,&dmm);
/* Map into memory space */
viMapAddress(dmm, VI_A16_SPACE, 0x00, 0x10,
VI_FALSE,
VI_NULL, &address);
/* Read instrument id register contents */
viPeek16(dmm, address, &id_reg);
/* Read device type register contents */
/* ViAddr is defined as a void so we must
cast it to something else to do pointer
arithmetic */
viPeek16(dmm, (ViAddr)((ViUInt16 *)a
0x01),
&devtype_reg);
/* Unmap memory space */
viUnmapAddress(dmm);
/* 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);
}
Summary of Contents for E2094S
Page 6: ...6 Agilent VISA User s Guide ...
Page 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Page 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Page 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...