Instrument Control Toolbox    
memread

High-level memory read from VXI register

Syntax

Arguments

obj
A VISA-VXI or VISA-GPIB-VXI object.
offset
Offset for the memory address space.
'precision'
The number of bits to read from the memory address.
'adrspace'
The memory address space.
offset
Offset for the memory address space.
size
The size of the data block to read.
out
An array containing the returned value.

Description

out = memread(obj) reads a uint8 value from the A16 address space with an offset of 0 for the object obj.

out = memread(obj,offset) reads a uint8 value from the A16 address space with an offset specified by offset. You must specify offset as a decimal value.

out = memread(obj,offset,'precision') reads the number of bits specified by precision from the A16 address space. precision can be uint8, uint16, or uint32, which instructs memread to read 8-, 16-, or 32-bit values, respectively. precision can also be single, which instructs memread to read single-precision values.

out = memread(obj,offset,'precision','adrspace') reads the specified number of bits from the address space specified by adrspace. adrspace can be A16, A24, or A32. The MemorySpace property indicates which VXI address spaces are used by the instrument.

out = memread(obj,offset,'precision','adrspace',size) reads a block of data with a size specified by size.

Remarks

Before you can read data from the VXI register, obj must be connected to the instrument with the fopen function. A connected instrument object has a Status property value of open. An error is returned if you attempt to read memory while obj is not connected to the instrument.

Example

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

Perform a high-level read of the first instrument register.

Perform a high-level read of the next three instrument registers.

Disconnect vv from the instrument.

Refer to Example: Using High-Level Memory Functions for a description of the first four registers of the E1432A digitizer.

See Also

Functions

fopen, mempeek, memwrite

Properties

MemoryIncrement, MemorySpace, Status


  mempoke memunmap