viMoveOut8/viMoveOut16/viMoveOut32/viMoveOut64, viMoveOut8Ex/viMoveOut16Ex/viMoveOut32Ex/viMoveOut64Ex
Purpose
Moves a block of data from local memory to the specified address space and offset.
C Syntax
ViStatus viMoveOut8(ViSession vi, ViUInt16 space, ViBusAddress offset, ViBusSize length, ViAUInt8 buf8)
ViStatus viMoveOut16(ViSession vi, ViUInt16 space, ViBusAddress offset, ViBusSize length, ViAUInt16 buf16)
ViStatus viMoveOut32(ViSession vi, ViUInt16 space, ViBusAddress offset, ViBusSize length, ViAUInt32 buf32)
ViStatus viMoveOut64(ViSession vi, ViUInt16 space, ViBusAddress offset, ViBusSize length, ViAUInt64 buf64)
ViStatus viMoveOut8Ex(ViSession vi, ViUInt16 space, ViBusAddress64 offset, ViBusSize length, ViAUInt8 buf8)
ViStatus viMoveOut16Ex(ViSession vi, ViUInt16 space, ViBusAddress64 offset, ViBusSize length, ViAUInt16 buf16)
ViStatus viMoveOut32Ex(ViSession vi, ViUInt16 space, ViBusAddress64 offset, ViBusSize length, ViAUInt32 buf32)
ViStatus viMoveOut64Ex(ViSession vi, ViUInt16 space, ViBusAddress64 offset, ViBusSize length, ViAUInt64 buf64)
Visual Basic Syntax
viMoveOut8&(ByVal vi&, ByVal space%, ByVal offset&, ByVal length&,buf8 as Byte)
viMoveOut16&(ByVal vi&, ByVal space%, ByVal offset&, ByVal length&, buf16%)
viMoveOut32&(ByVal vi&, ByVal space%, ByVal offset&, ByVal length&, buf32&)
Resource Classes
FireWire INSTR, GPIB-VXI INSTR, GPIB-VXI MEMACC, PXI INSTR, PXI MEMACC, VXI INSTR, VXI MEMACC
Parameters
Name | Direction | Description |
---|---|---|
vi |
IN |
Unique logical identifier to a session. |
space |
IN |
Specifies the address space. Refer to the table included in the Description section. |
offset |
IN |
Offset (in bytes) of the device to write to. For viMoveOutXX() operations, this is a 32-bit value for 32-bit applications and a 64-bit value for 64-bit applications. For viMoveOutXXEx() operations, this is always a 64-bit value. |
length |
IN |
Number of elements to transfer, where the data width of the elements to transfer is identical to data width (8, 16, 32, or 64 bits). |
buf8, buf16, buf32, or buf64 |
IN |
Data to write to bus (8 bits for viMoveOut8[Ex](), 16 bits for viMoveOut16[Ex](), 32 bits for viMoveOut32[Ex](), and 64 bits for viMoveOut64[Ex]()). |
Return Values
Completion Codes | Description |
---|---|
VI_SUCCESS |
Operation completed successfully. |
Error Codes | Description |
---|---|
VI_ERROR_INV_OBJECT |
The given session reference is invalid. |
VI_ERROR_NSUP_OPER |
The given vi does not support this operation. |
VI_ERROR_RSRC_LOCKED |
Specified operation could not be performed because the resource identified by vi has been locked for this kind of access. |
VI_ERROR_BERR |
Bus error occurred during transfer. |
VI_ERROR_INV_SPACE |
Invalid address space specified. |
VI_ERROR_INV_OFFSET |
Invalid offset specified. |
VI_ERROR_NSUP_OFFSET |
Specified offset is not accessible from this hardware. |
VI_ERROR_NSUP_WIDTH |
Specified width is not supported by this hardware. |
VI_ERROR_INV_LENGTH |
Invalid length specified. |
VI_ERROR_NSUP_ALIGN_OFFSET |
The specified offset is not properly aligned for the access width of the operation. |
VI_ERROR_INV_SETUP |
Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state). |
Description
The viMoveOutXX[Ex]() operations use the specified address space to write 8, 16, 32, or 64 bits of data, respectively, to the specified offset. These operations do not require viMapAddress() to be called prior to their invocation.
The following table lists the valid entries for specifying address space.
Interface | Values |
---|---|
VXI, VME, and GPIB-VXI |
VI_A16_SPACE (1) |
PXI INSTR |
VI_PXI_CFG_SPACE (10) |
PXI MEMACC |
VI_PXI_ALLOC_SPACE (9) |
FireWire INSTR |
VI_FIREWIRE_DFLT_SPACE (5) |
Note viMoveOut8 and viMoveOut16 do not support FireWire INSTR. |
For these operations, VISA ignores the attribute VI_ATTR_SRC_INCREMENT and increments the local buffer address for each element. It is valid for the VISA driver to copy the data out of the user buffer at any width it wants. In other words, even if the width is a byte (8-bit), the VISA driver can perform 32-bit PCI burst accesses because it is just memory, to improve throughput.
INSTR Specific
Notice that the offset parameter to these operations for an INSTR Resource is the offset address relative to the device's allocated address base for the corresponding address space that was specified. For example, if space specifies VI_A16_SPACE, then offset specifies the offset from the logical address base address of the specified VXI device. If space specifies VI_A24_SPACE or VI_A32_SPACE, then offset specifies the offset from the base address of the VXI device's memory space allocated by the VXI Resource Manager within VXI A24 or A32 space.
Notice also that the length specified in the viMoveInXX() operations for an INSTR Resource 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.
To specify the full 48-bit offset for these methods on a FireWire INSTR session, a call to viSetAttribute using VI_ATTR_FIREWIRE_DEST_UPPER_OFFSET is needed prior to calling these methods. Subsequent calls to viSetAttribute are needed only if the upper 16 bits of the FireWire offset change.
MEMACC Specific
For a MEMACC Resource, the offset parameter specifies an absolute address.
Notice also that the length parameter to these operations for a MEMACC Resource 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.
Related Topics
VI_ATTR_FIREWIRE_DEST_UPPER_OFFSET
viMoveIn8/viMoveIn16/viMoveIn32/viMoveIn64, viMoveIn8Ex/viMoveIn16Ex/viMoveIn32Ex/viMoveIn64Ex