Main Content

memunmap

(To be removed) Unmap memory for low-level memory read and write operations

This visa object function will be removed in a future release. Use visadev object functions instead. For more information, see Version History.

Syntax

memunmap(obj)

Arguments

obj

A VISA-VXI or VISA-GPIB-VXI object.

Description

memunmap(obj) unmaps memory space previously mapped by the memmap function.

Examples

Create the VISA-VXI object vv associated with a VXI chassis with index 0, and a Keysight® E1432A digitizer with logical address 130.

vv = visa('keysight','VXI0::130::INSTR');
fopen(vv)

Map 16 bytes in the A16 address space.

memmap(vv,'A16',0,16)

Read the first and second instrument registers.

reg1 = mempeek(vv,0,'uint16');
reg2 = mempeek(vv,2,'uint16');

Use memunmap to unmap the memory, and disconnect vv from the instrument.

memunmap(vv)
fclose(vv)

Tips

When the memory space is unmapped, the MappedMemorySize property is set to 0 and the MappedMemoryBase property is set to 0H.

Version History

Introduced before R2006a

collapse all

R2021a: visa object interface will be removed

Use of this function with a visa object will be removed. To access a VISA resource, use a visadev object with its functions and properties instead.

The recommended functionality has additional capabilities and improved performance. See Transition Your Code to visadev Interface for more information about using the recommended functionality.