Download NI-VISA Programmer Reference Manual

Transcript
Chapter 5
Operations
viMemAlloc
Purpose
Allocates memory from a device’s memory region.
C Syntax
ViStatus viMemAlloc(ViSession vi, ViBusSize size,
ViPBusAddress offset)
Visual Basic Syntax
viMemAlloc&(ByVal vi&, ByVal size&, offset&)
Resource Classes
GPIB-VXI INSTR, PXI MEMACC, VXI INSTR
Parameters
Name
Direction
Description
vi
IN
Unique logical identifier to a session.
size
IN
Specifies the size of the allocation.
offset
OUT
Returns the offset of the allocated device memory.
Return Values
Completion Codes
VI_SUCCESS
Description
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_INV_SIZE
Invalid size specified.
NI-VISA Programmer Reference Manual
5-64
ni.com