User`s guide

Programming via GPIB and VXI 4
Agilent VISA User’s Guide 119
/* Print results */
printf ("dereference: ID Register =
0x%4X\n",id_reg);
printf ("dereference: Device Type Register
=0x%4X\n", devtype_reg);
}
/* Unmap memory space */
viUnmapAddress (vi);
/*==============================================
High Level memory I/O = viIn16
==============================================*/
/* Read instrument id register contents */
viIn16 (vi, VI_A16_SPACE, 0x00, &&id_reg);
/* Read device type register contents */
viIn16 (vi, VI_A16_SPACE, 0x02,&devtype_reg);
/* Print results */
printf (" viIn16: ID Register = 0x%4X\n",
id_reg);
printf (" viIn16: Device Type Register =
0x%4X\n", devtype_reg);
/*==============================================
======
High Level block memory I/O = viMoveIn16
The viMoveIn/viMoveOut commands do both block
read/write and FIFO read write. These commands
offer the best performance for reading and
writing large data blocks on the VXI backplane.
For this example we are only moving 2 words at a
time. Normally, these functions would be used to
move much larger blocks of data.
If the value of VI_ATTR_SRC_INCREMENT is 1 (the
default),viMoveIn does a block read. If the
value of VI_ATTR_SRC_INCREMENT is 0, viMoveIn
does a FIFO read.