Allocates buffers and configures the timeout value for asynchronous writes. The timeout value applies to all subsequent asynchronous writes. You must use this function to configure the asynchronous writes before using the TDMS Advanced Asynchronous Write function.


icon

Inputs/Outputs

  • cu32.png max write size

    max write size specifies the maximum size, in samples, to allocate for each asynchronous write. This input is valid only if pre-allocate? is TRUE.

    You can calculate the actual maximum size, in bytes, that this function pre-allocates by multiplying the value of max write size by the number of bytes of data type. For example, if the value of max write size is 512 and data type is an unsigned 16-bit integer, then you can calculate the actual maximum size that this function pre-allocates as follows: 512×(16÷8) = 1024 bytes.

    Note If the disable buffering? input of the TDMS Advanced Open function is TRUE, the actual maximum size in bytes must be a multiple of the sector size of the hard disk. Use the TDMS Advanced Open function to obtain the sector size of the hard disk.
  • cbool.png pre-allocate? (F)

    pre-allocate? specifies whether to pre-allocate buffers to return to LabVIEW in exchange for the data buffers you pass to the TDMS Advanced Asynchronous Write function. The default is FALSE.

    Set the value to TRUE to avoid run-time buffer allocations. If pre-allocate? is TRUE, you must wire a supported data type to this function.

  • cgnrn.png tdms file

    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.

  • cu32.png max asynchronous writes (4)

    max asynchronous writes specifies the maximum number of asynchronous writes that can run simultaneously in the background. After the number of pending asynchronous writes reaches the maximum value, the TDMS Advanced Asynchronous Write function waits for a pending asynchronous write to complete before issuing another asynchronous write. The value must be greater than zero. The default is 4.

  • cerrcodeclst.png error in (no error)

    error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

  • cu8.png data type

    data type specifies the data type of the pre-allocated buffers. These pre-allocated buffers are returned to LabVIEW in exchange for the data buffers you pass to the TDMS Advanced Asynchronous Write function. This input accepts integers, floating-point numbers, Booleans, and timestamps. You must wire a supported data type to this input if pre-allocate? is TRUE. LabVIEW ignores this input if pre-allocate? is FALSE.

  • cdbl.png timeout (5 s)

    timeout specifies the timeout value, in seconds, for the TDMS Advanced Asynchronous Write function. When the number of pending asynchronous writes reaches the maximum value, the TDMS Advanced Asynchronous Write function waits as long as the timeout value for a pending asynchronous write to complete before issuing another asynchronous write. If you do not wire data to this input, this function sets the value to 5.

  • ignrn.png tdms file out

    tdms file out returns a TDMS file reference to the .tdms file on which you performed the operation.

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.

  • Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\File IO\TDMS\Advanced Read and Write\Asynchronous Read and Write\TDMS Advanced Append Multiple Headers.vi
    • labview\examples\File IO\TDMS\Advanced Read and Write\Asynchronous Read and Write\TDMS Advanced Asynchronous Write.vi