viMoveOut8Ex, viMoveOut16Ex, viMoveOut32Ex, and viMoveOut64Ex

Agilent VISA.NET

viMoveOut8Ex, viMoveOut16Ex, viMoveOut32Ex, and viMoveOut64Ex

Syntax

viMoveOut8Ex(ViSession vi, ViUInt16 space, ViBusAddress64 offset64, ViBusSize length, ViAUInt8 buf8); 

viMoveOut16Ex(ViSession vi, ViUInt16 space, ViBusAddress64 offset64, ViBusSize length, ViAUInt16 buf16);

viMoveOut32Ex(ViSession vi, ViUInt16 space, ViBusAddress64 offset64, ViBusSize length, ViAUInt32 buf32);

viMoveOut64Ex(ViSession vi, ViUInt16 space, ViBusAddress64 offset64, ViBusSize length, ViAUInt64 buf64); 

Description

This VISA 4.0 (and later) function moves an 8-bit, 16-bit, 32-bit, or 64-bit block of data from local memory to the specified memory space (assigned memory base + offset). This function writes the 8-bit, 16-bit, 32-bit, or 64-bit value to the address space pointed to by space. The offset must be a valid memory address in the space. This function does not require viMapAddressEx to be called prior to its invocation.

If the ViSession parameter (vi) refers to an INSTR session, the offset parameters specify relative offsets from the start of the instrument’s address space. If the ViSession parameter (vi) refers to a MEMACC session, the offset parameters are absolute offsets from the start of memory in the specified VXI address space.

Valid entries for specifying address space:

Value

Description

VI_A16_SPACE

Address A16 memory address space of the VXI/MXI bus.

VI_A24_SPACE

Address A24 memory address space of the VXI/MXI bus.

VI_A32_SPACE

Address A32 memory address space of the VXI/MXI bus.

VI_A64_SPACE

Address the A64 address space of VXI/MXI bus.

VI_PXI_CFG_SPACE

Address the PCI configuration space.

VI_PXI_BAR0_SPACE – VI_PXI_BAR5_SPACE

Address the specified PCI memory or I/O space.

VI_PXI_ALLOC_SPACE

Access physical locally allocated memory.

The viMoveOutnEx functions do a block move of memory from a VXI device if VI_ATTR_DEST_INCREMENT is 1. However, they do a FIFO read of a VXI memory location if VI_ATTR_DEST_INCREMENT is 0 (zero).

For an INSTR resource, the offset is a relative address of the device associated with the given INSTR resource. For a MEMACC resource, the offset parameter specifies an absolute address.

All operations on a PXI MEMACC resource that accept a space parameter to indicate the address space for bus access SHALL accept the following value for the space parameter: VI_PXI_ALLOC_SPACE.

The offset specified in the viMoveOut8Ex, viMoveOut16Ex, viMoveOut32Ex, and viMoveOut64Ex operations for an INSTR resource is the offset address relative to the device's allocated address base for the corresponding address space specified.

For example, if space specifies VI_A16_SPACE, offset specifies the offset from the logical address base address of the VXI device specified. If space specifies VI_A24_SPACE, VI_A32_SPACE, or VI_A64_SPACE offset specifies the offset from the base address of the VXI device's memory space allocated by the VXI Resource Manager within VXI A24, A32, or A64 space.

The length specified in the viMoveOutnEx operations is the number of elements (of the size corresponding to the operation) to transfer, beginning at the specified offset. Therefore, offset + length*size cannot exceed the amount of memory exported by the device in the given space.

The length specified in the viMoveOutnEx operations is the number of elements (of the size corresponding to the operation) to transfer, beginning at the specified offset. Therefore, offset + length*size cannot exceed the total amount of memory available in the given space.

Parameters

Name

Dir

Type

Description

vi

IN

ViSession

Unique logical identifier to a session.

space

IN

ViUInt16

Specifies the address space. (See the following table.)

offset64

IN

ViBusAddress64

64-bit offset (in bytes) of the starting address or register to write to.

length

IN

ViBusSize

Number of elements to transfer, where the data width of the elements to transfer is 8 bits for viMoveOut8Ex, 16 bits for viMoveOut16Ex, 32 bits for viMoveOut32Ex, or 64-bit for viMoveOut64Ex.

buf8, buf16, buf32, or buf64

IN

ViAUInt8, ViAUInt16, ViAUInt32,
ViAUInt64

Data written to the bus (8 bits for viMoveOut8Ex, 16 bits for viMoveOut16Ex, 32 bits for viMoveOut32Ex, and 64 bits for viMOveOut64Ex).

Return Values

Type ViStatus

This is the function return status. It returns either a completion code or an error code as follows.

Completion Code

Description

VI_SUCCESS

Operation completed successfully.

Error Codes

Description

VI_ERROR_BERR

Bus error occurred during transfer.

VI_ERROR_INV_LENGTH

Invalid length specified.

VI_ERROR_INV_OFFSET

Invalid offset specified.

VI_ERROR_INV_SESSION
VI_ERROR_INV_OBJECT

The given session or object reference is invalid (both are the same value).

VI_ERROR_INV_SETUP

Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state).

VI_ERROR_INV_SPACE

Invalid address space specified.

VI_ERROR_NSUP_ALIGN_OFFSET

The specified offset is not properly aligned for the access width of the operation.

VI_ERROR_NSUP_OFFSET

Specified offset is not accessible from this hardware.

VI_ERROR_NSUP_OPER

The given vi does not support this function.

VI_ERROR_NSUP_WIDTH

Specified width is not supported by this hardware.

VI_ERROR_RSRC_LOCKED

Specified operation could not be performed because the resource identified by vi has been locked for this kind of access.

See Also

viMoveIn8Ex, viMoveIn16Ex, viMoveIn32Ex, viMoveIn64ExviOut8Ex, viOut16Ex, viOut32Ex, viOut64Ex