User`s guide
94 Agilent VISA User’s Guide
4 Programming via GPIB and VXI
Using Low-Level Memory Functions
Low-level memory functions allow direct access to memory on the
interface just as do high-level memory functions. However, with
low-level memory function calls, you must map a range of addresses
and directly access the registers with low-level memory functions, such
as viPeek32 and viPoke32.
There is more programming effort required when using low-level
memory functions. However, the program execution speed can increase.
Additionally, to increase program execution speed, the low-level
memory functions do not return error codes.
Programming the Registers
When using the low-level memory functions for direct register access,
you must first map a range of addresses using the viMapAddress
function. Next, you can send a series of peeks and pokes using the
viPeek and viPoke low-level memory functions. Then, you must free
the address window using the viUnmapAddress function. A process
you could use is:
1 Map memory space using viMapAddress.
2 Read and write to the register's contents using viPeek32 and
viPoke32.
3 Unmap the memory space using viUnmapAddress.
Low-Level Memory Functions
You can program the registers using low-level functions for 8-, 16-, or
32-bit transfers. This table summarizes the low-level memory functions.
Table 21 Summary of Low-Level Memory Functions
Function Description
viMapAddress(vi,
mapSpace, mapBase,
mapSize, access, suggested,
address);
Maps the specified memory space.
viPeek8(vi, addr, val8); Reads 8 bits of data from address specified.