| Instrument Control Toolbox | ![]() |
High-level memory read from VXI register
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
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 bits of data, respectively.
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 space(s) are used by the instrument.
out = memread(obj,offset,' reads a block of data with a size specified by precision','adrspace',size)
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.
vv = visa('agilent','VXI0::130::INSTR');
fopen(vv)
Perform a high-level read of the first instrument register.
reg1 = memread(vv,0,'uint16')
reg1 =
53247
Perform a high-level read of the next three instrument registers.
reg24 = memread(vv,2,'uint16','A16',3)
reg24 =
20993
50012
40960
Disconnect vv from the instrument.
fclose(vv)
Refer to Example: Using High-Level Memory Functions for a description of the first four registers of the E1432A digitizer.
Functions
Properties
| mempoke | memunmap | ![]() |