User`s guide

Programming via GPIB and VXI 4
Agilent VISA User’s Guide 109
Mapping Memory Space
When using VISA to access the device's registers, you must
map memory space into your process space. For a given
session, you can have only one map at a time. To map space
into your process, use the VISA viMapAddress function:
viMapAddress(vi, mapSpace, mapBase, mapSize,
access, suggested, address);
This function maps space for the device specified by the vi
session. mapBase
, mapSize, and suggested are used to
indicate the offset of the memory to be mapped, amount of
memory to map, and a suggested starting location,
respectively. mapSpace determines which memory location
to map the space. The following are valid mapSpace choices:
VI_A16_SPACE - Maps in VXI/MXI A16 address space
VI_A24_SPACE - Maps in VXI/MXI A24 address space
VI_A32_SPACE - Maps in VXI/MXI A32 address space
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.
viPeek16(vi, addr, val16); Reads 16 bits of data from address specified.
viPeek32(vi, addr, val32); Reads 32 bits of data from address specified.
viPoke8(vi, addr, val8); Writes 8 bits of data to address specified.
viPoke16(vi, addr, val16); Writes 16 bits of data to address specified.
viPoke32(vi, addr, val32); Writes 32 bits of data to address specified.
viUnmapAddress(vi); Unmaps memory space previously mapped.
Table 26 Summary of Low-Level Memory Functions