Documentation Center

  • Trial Software
  • Product Updates

memwrite

High-level memory write to VXI register

Syntax

memwrite(obj,data)
memwrite(obj,data,offset)
memwrite(obj,data,offset,'precision')
memwrite(obj,data,offset,'precision','adrspace')

Arguments

obj

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

data

The data written to the memory address.

offset

Offset for the memory address space.

'precision'

The number of bits to write to the memory address.

'adrspace'

The memory address space.

Description

memwrite(obj,data) writes the uint8 value specified by data to the A16 address space with an offset of 0 for the object obj. data can be an array of uint8 values.

memwrite(obj,data,offset) writes data to the A16 address space with an offset specified by offset. offset is specified as a decimal value.

memwrite(obj,data,offset,'precision') writes data with precision specified by precision. precision can be uint8, uint16, or uint32, which instructs memwrite to write data as 8-, 16-, or 32-bit values, respectively. precision can also be single, which instructs memwrite to write data as single-precision values.

memwrite(obj,data,offset,'precision','adrspace') writes data to 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.

Examples

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 write to the fourth instrument register, which has an offset of 6.

memwrite(vv,45056,6,'uint16','A16')

Disconnect vv from the instrument.

fclose(vv)

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

More About

expand all

Tips

Before you can write to 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 a write operation while obj is not connected to the instrument.

See Also

| | | | |

Was this topic helpful?