FIFO.Acquire Read Region (Invoke Method)

Requests a region to read from the host memory buffer in the target device driver and returns an external data value reference to this region. This method automatically starts the DMA channel if called without a previous call to the Start method.

Note The Acquire Read Region method is available only if the FIFO Type is Target to Host—DMA in the General FIFO Properties page.

Refer to Improving Efficiency When Accessing DMA FIFOs for more information about using this method.

Use the Invoke Method function to implement this method.

Option Description
FPGA VI Reference In FPGA VI Reference In is a reference to an FPGA VI. You must open a reference to the FPGA VI to use this parameter.
error in error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Number of Elements Number of Elements specifies the size in elements of the buffer region being acquired.
Note NI recommends that Number of Elements be a clean integer divisor of the host FIFO size. You configure the host FIFO size using the FIFO.Configure method. For example, for a host FIFO size of 32,768 elements, and a Number of Elements of 8,192, four calls to the Acquire Read Region method read all of the data in the FIFO. In this example, subsequent calls to the Acquire Read Region method start over at the beginning of the FIFO. However, if Number of Elements is not a clean integer divisor of the host FIFO size, LabVIEW returns a partial region of data from the end of the FIFO. In this case, Elements in Region returns the actual number of elements in the region.
Timeout (ms) Timeout (ms) specifies the minimum number of milliseconds the Invoke Method function waits before timing out. The Invoke Method function times out if the region is available for access but the device has not yet transferred the requested amount of data into the buffer, or if part of the region is not yet available for access. The default is 5000 milliseconds. Set this parameter to –1 if you want the Invoke Method function to wait indefinitely.
FPGA VI Reference Out FPGA VI Reference Out returns a reference to an FPGA VI.
error out error out contains error information. This output provides standard error out functionality.
Read Region Reference Read Region Reference returns a reference to the array of elements allocated by the device driver. You must delete this external data value reference before the driver can write new data to the specified portion of the buffer.
Elements in Region Elements in Region returns the total number of elements in the acquired memory region.
Elements Remaining Elements Remaining returns the number of elements in the host memory buffer that are available to read.