memread
(To be removed) High-level memory read from VXI register
This visa object function will be removed in a future release. Use
visadev
object functions instead. For more information, see Version History.
Syntax
out = memread(obj)
out = memread(obj,offset)
out = memread(obj,offset,'precision')
out = memread(obj,offset,'precision','adrspace')
out = memread(obj,offset,'precision','adrspace',size)
Arguments
| A VISA-VXI or VISA-GPIB-VXI object. |
| Offset for the memory address space. |
| The number of bits to read from the memory address. |
| The memory address space. |
| Offset for the memory address space. |
| The size of the data block to read. |
| 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,'
reads the number of bits specified by precision')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,'
reads the specified number of bits from the address space specified by
precision','adrspace')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,'
reads a block of data with a size specified by precision','adrspace',size)size.
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)Perform a high-level read of the first instrument register.
reg1 = memread(vv,0,'uint16')
reg1 =
53247Perform a high-level read of the next three instrument registers.
reg24 = memread(vv,2,'uint16','A16',3)
reg24 =
20993
50012
40960Disconnect vv from the instrument.
fclose(vv)
Tips
Before you can read data from the VXI register, obj must be
connected to the instrument with the fopen function. A connected
interface 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.
Version History
Introduced before R2006aSee Also
fopen | mempeek | memwrite | MemoryIncrement | MemorySpace