Specify whether VXI register offset increments after data is transferred
You can configure MemoryIncrement
to be block
or FIFO
.
If MemoryIncrement
is block
,
the memread
and memwrite
functions
increment the offset after every read and write operation, and data
is transferred from or to consecutive memory elements. If MemoryIncrement
is FIFO
,
the memread
and memwrite
functions
do not increment the VXI register offset, and data is always read
from or written to the same memory element.
Usage | VISA-VXI, VISA-GPIB-VXI |
Read only | Never |
Data type | Character vector |
| Increment the VXI register offset. |
| Do not increment the VXI register offset. |
Create the VISA-VXI object v
associated with
a VXI chassis with index 0, and an instrument with logical address
8.
v = visa('ni','VXI0::8::INSTR'); fopen(v)
Configure the hardware for a FIFO read and write operation.
v.MemoryIncrement = 'FIFO'
Write two values to the VXI register starting at offset 16.
Because MemoryIncrement
is FIFO
,
the VXI register offset does not change and both values are written
to offset 16.
memwrite(v,[1984 2000],16,'uint32','A16')
Read the value at offset 16. The value returned is the second
value written with the memwrite
function.
memread(v,16,'uint32') ans = 2000
Read two values starting at offset 16. Note that both values are read at offset 16.
memread(v,16,'uint32','A16',2); ans = 2000 2000
Configure the hardware for a block read and write operation.
v.MemoryIncrement = 'block'
Write two values to the VXI register starting at offset 16.
The first value is written to offset 16 and the second value is written
to offset 20 because a uint32
value consists of
four bytes.
memwrite(v,[1984 2000],16,'uint32','A16')
Read the value at offset 16. The value returned is the first
value written with the memwrite
function.
memread(v,16,'uint32') ans = 1984
Read two values starting at offset 16. The first value is read at offset 16 and the second value is read at offset 20.
memread(v,16,'uint32','A16',2); ans = 1984 2000