Table Of Contents

TDMS Flush (G Dataflow)

Version:
    Last Modified: March 29, 2017

    Forces the operating system to write any buffer data to the .tdms file.

    When a node writes data to a .tdms file, the data waits in a buffer until the buffer fills up or until you close the reference to the file. After the buffer fills up or you close the reference, this node forces the operating system to write any data in the buffer to the .tdms file.

    spd-note-note
    Note  

    To optimize the writing performance of your application, flush TDMS data sparingly. Flushing data frequently can negatively impact the writing performance of your application.

    Copyright: (c) 2017 National Instruments. All rights reserved.

    connector_pane_image
    datatype_icon

    tdms file

    A reference to a .tdms file. Use the TDMS Open node to obtain the reference.

    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    tdms file out

    A reference to the .tdms file.

    datatype_icon

    error out

    Error information.

    The node produces this output according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    File Buffering with TDMS Files

    When a TDMS node writes data to a .tdms file, the data waits in a buffer until the buffer fills up or until you close the file. Buffering holds more data values in memory and allows you to wait and flush data to disk once, rather than continuously writing data. This both improves performance and causes the .tdms file to have fewer segments and be less fragmented. Files with fewer segments are more compact and take less time to open.

    Buffering can occur at the channel layer, in the operating system (OS) file system, or in the TDMS disk cache. The layer at which buffering occurs depends on the property you set using the node. For example, the NI_MinimumBufferSize property determines the number of data samples to buffer at the channel layer. The disable buffering input of TDMS nodes determines whether to disable system buffering, which occurs in the OS. When the disable buffering input is True, this product disables system buffering and buffering occurs in the TDMS disk cache. The NI_DiskCacheSize property determines the amount of cache size in the TDMS disk cache to allocate for data. This property is valid only if the disable buffering input is True.

    To write all buffers directly to the TDMS file, use the TDMS Flush node.

    spd-note-note
    Note  

    The NI_MinimumBufferSize property and the NI_DiskCacheSize property do not apply to the Advanced TDMS nodes.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics