TDMS Advanced Asynchronous Read (Data Ref) Function

Owning Palette: TDMS Advanced Data Reference I/O Functions

Requires: Base Development System (Windows)

Reads data from the specified .tdms file asynchronously and stores the data in the memory of a component external to LabVIEW. Use the data reference input of this function to specify the location of the external memory, such as a region of a DMA buffer owned by a device driver.

Details  

 Add to the block diagram  Find on the palette
tdms file specifies a reference number to the .tdms file on which to perform the operation. Use the TDMS Advanced Open function to open the refnum.
data reference specifies the external data value reference that points to the region of an external buffer in which you want LabVIEW to store the data this function reads from the .tdms file. This input accepts an external data value reference containing a 1D or 2D array of integers, floating-point numbers, Booleans, or timestamps. If the disable buffering? input of the TDMS Advanced Open function is TRUE, the size of data that you wire to the data reference input must be a multiple of the sector size.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
auto delete reference? specifies whether you want LabVIEW to delete the data reference automatically after the asynchronous operation completes. Deleting the data reference notifies the owner of the external memory that LabVIEW no longer needs access to the external memory. The default is TRUE. Set this value to FALSE when you want to continue using the reference after the asynchronous operation completes. For example, you might want to modify the data in LabVIEW before deleting the reference. If you set the value to FALSE, you must use the Delete Data Value Reference function to delete the data reference.
tdms file out returns a TDMS file reference to the .tdms file on which you performed the operation.
error out contains error information. This output provides standard error out functionality.
read process finished? indicates whether the reading process is finished or not.
Tip  Use this Boolean value as one of the stop conditions for a While Loop. For example, you can place the TDMS Advanced Asynchronous Read (Data Ref) function in the While Loop to read data indefinitely until the value of read process finished? returns TRUE. This value returns TRUE when one of the following conditions occurs:
  • The TDMS Advanced Asynchronous Read (Data Ref) function reaches the end of a .tdms file.
  • The TDMS Advanced Asynchronous Read (Data Ref) function finishes reading the total size of data that you specify for the TDMS Configure Asynchronous Reads (Data Ref) function.

TDMS Advanced Asynchronous Read (Data Ref) Details

This function can issue additional asynchronous reads while executing previously-issued asynchronous reads in the background. When the number of asynchronous reads in the background reaches the maximum value, this function waits until a previously-issued asynchronous read completes before issuing an additional asynchronous read. If the previously-issued asynchronous read does not complete within the timeout value, this function returns error code –2546. Use the TDMS Configure Asynchronous Reads (Data Ref) function to configure the maximum number of asynchronous reads and the timeout value.

Use the TDMS Get Asynchronous Read Status (Data Ref) function to query the number of pending asynchronous reads.