User`s guide
Programming via GPIB and VXI 4
Agilent VISA User’s Guide 111
VI_FALSE,
VI_NULL, &address);
viPeek16(vi, addr, &value)
Unmapping Memory Space
Make sure you use the viUnmapAddress function to unmap
the memory space when it is no longer needed. Unmapping
memory space makes the window available for the system to
reallocate.
Low-Level Memory Functions: Code Samples
Two sample programs follow that use the low- level memory
functions to read the ID and Device Type registers of the
device at VXI logical address 24. The contents of the
registers are then printed out. The first program uses the
VXI interface and the second program uses the GPIB- VXI
interface to access the VXI backplane. These two programs
are identical except for the string passed to viOpen.
Sample: Using the VXI Interface (Low-Level) Memory Functions
This program uses low- level memory functions and the VXI
interface to read the ID and Device Type registers of a
device at VXI0::24.
/*vxill.c
This example program uses the low-level memory
functions to read the id and device type
registers of the device at 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;
ViAddr address;
unsigned short id_reg, devtype_reg;