Table Of Contents

TDMS Get Properties (G Dataflow)

Version:
    Last Modified: March 29, 2017

    Returns the properties of a .tdms file, group, or channel.

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

    connector_pane_image
    datatype_icon

    data type

    Data type of the property value or values you want to return.

    Acceptable Data Types and Their Default Values

    Data Type Default
    Signed or unsigned integer 0
    Single-precision or double-precision floating-point number 0
    Complex single-precision or double-precision floating-point number 0+0i
    Extended-precision floating-point number 0
    Alphanumeric string that does not contain null characters Empty string
    Timestamp 00:00:00.000
    Boolean False
    Variant that contains any of the data types specified above Empty variant
    datatype_icon

    property name

    Name of the property whose values you want to get.

    datatype_icon

    tdms file

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

    datatype_icon

    group name

    Channel group on which to perform the operation.

    If you wire a value to channel name, you must also wire a value to group name.

    datatype_icon

    channel name

    Channel on which to perform the operation.

    If you wire a value to channel name, you must also wire a value to group name.

    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

    group name out

    Channel group on which you performed the operation.

    datatype_icon

    channel name out

    Channel on which you performed the operation.

    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.
    datatype_icon

    property values

    Property values of the .tdms file, group, or channel.

    property values is not available if you wire property name.

    datatype_icon

    property value

    Property value of the .tdms file, group, or channel.

    property value is available only if you wire property name.

    datatype_icon

    property names

    Property names of the .tdms file, group, or channel.

    property names is not available if you wire property name.

    datatype_icon

    found

    A Boolean that returns whether the property exists in the .tdms file or not.

    TRUE The property does exist.
    FALSE The property does not exist.

    found is available only if you wire property name.

    Searching at the File, Group, or Channel Level

    The following table shows the inputs you must wire to search for properties at the file, group, or channel level.

    Search level Required Inputs Comments
    File or root level None Leave group name and channel name empty to search at the file or root level.
    Group level group name
    Channel level group name and channel name If channel name contains a value, group name must also contain a value.

    Returning a Single Property

    To get the value of a single property, wire property name and data type. If this node finds the property, found returns TRUE and property value returns the value of the property. If this node does not find the property, found returns FALSE and property value returns the default value of data type.

    Returning Multiple Properties

    To return more than one property, leave property name and data type empty. This node returns the property names and values of the file, group, or channel you specify to search.

    Properties in a .tdms File

    The following table lists all properties you might find in a .tdms file.

    Property Name Data Type Access Available in File Format Versions Description
    name String Read/write 2.0 Specifies the object name, such as the root name, group name, or channel name, in a .tdms file.
    NI_ArrayColumn 32-bit signed integer numeric Read only 1.0 and 2.0 Indicates the index of a column in a 2D array. This property appears in a .tdms file only if you write a 2D array of data to the file.
    NI_ChannelLength 64-bit unsigned integer numeric Read only 1.0 and 2.0 Represents the number of values in a channel of a .tdms file.
    NI_DataType 16-bit unsigned integer numeric Read only 1.0 and 2.0 Represents the data type of a channel. The value is an integer that corresponds to a type code.
    NI_DigitalCompression Boolean Read only 1.0 and 2.0 Indicates whether a digital table is compressed or not. A value of 1 indicates that the digital table is compressed. If the digital table is not compressed, this property does not appear.
    NI_DigitalLine 32-bit signed integer numeric Read only 1.0 and 2.0 Indicates the index of a row in a digital table.
    NI_DigitalNumberOfLines 32-bit signed integer numeric Read only 1.0 and 2.0 Indicates the number of rows in a digital table.
    NI_Number_Of_Scales 32-bit unsigned integer numeric Read/write 2.0 Specifies the number of scales to use when you read data from a .tdms file. For example, if a .tdms file has five scales and you set the value of NI_Number_Of_Scales to 4, only the first four scales are applied to the data when you read the .tdms file.
    NI_Scale[n]_config, where n represents the order of the scale and config represents the configuration of the scale. N/A Read/write 2.0 Specifies the scaling information for the data in a .tdms file. You can create more than one scale in a .tdms file.
    NI_Scaling_Status String Read/write 2.0 Specifies whether to scale data when reading the data from a .tdms file. If the value is unscaled and the .tdms file contains one or more scales, the data is scaled. If the value is scaled, the data is not scaled.
    unit_string String Read/write 1.0 and 2.0 Specifies the unit of the channel data in a .tdms file.
    wf_increment Double Read/write 1.0 and 2.0 Represents the increment between two consecutive samples on the x-axis.
    wf_samples 32-bit signed integer numeric Read/write 1.0 and 2.0 Represents the number of samples in the first data chunk of the waveform you write to a .tdms file. The value must be greater than zero.
    wf_start_offset Double Read only 1.0 and 2.0 Frequency-domain data and histogram results use this value as the first value on the x-axis.
    wf_start_time Timestamp Read only 1.0 and 2.0 Represents the time at which the waveform was acquired or generated. This property can be zero if the time information is relative or the waveform is not in time domain.
    wf_time_pref String Read only 1.0 and 2.0 Indicates whether to interpret the x-axis data in absolute time or relative time.
    wf_xname String Read only 1.0 and 2.0 Indicates the name of the x-axis of the waveform.
    wf_xunit_string String Read only 1.0 and 2.0 Indicates the unit text of the x-axis.

    If the data type of a property is not valid, this node treats the property as a customized property and the property will not perform as described in the table.

    Additional Properties that Affect .tdms Data and Performance

    The following table lists all properties that do not exist in a .tdms file, but which you can use to perform certain actions.

    Property Name Data Type Access Available in File Format Versions Description
    NI_DiskCacheSize 32-bit unsigned integer numeric Read/write 2.0 You can use the NI_DiskCacheSize property to improve the .tdms data writing performance by allocating a specific amount of cache size in memory for the data. .tdms data is written in bytes per file. This property is valid only when the disable buffering input of the TDMS Open node is TRUE. The default value for this property is approximately 2 MB. Wire a different value to the property values input of the TDMS Set Properties node to change the cache size. A greater value for the NI_DiskCacheSize property usually can improve the writing performance; however, a greater value also requires more computer resources.
    NI_DiskGapSize 32-bit unsigned integer numeric Read/write 2.0 You can use the NI_DiskGapSize property to improve the .tdms data reading performance when reading discontinuous data. This property is valid only when the disable buffering input of the TDMS Open node is TRUE. The value of the NI_DiskGapSize property is a multiple of the sector size of the local hard disk. The default value for this property is 10. If the data gap in the .tdms file is less than the value of the NI_DiskGapSize property, the TDMS Read node can read all data from the file at one time. If the data gap in the .tdms file is greater than the value of the NI_DiskGapSize property, the TDMS Read node reads each piece of data one at a time until this node finishes reading all data. Wire a value to the property values input of the TDMS Set Properties node to change the gap size.
    spd-note-note
    Note  

    Obtaining the optimal reading and writing performance is a trial-and-error process. The same configuration might not return the same optimal performance on different computers. You might need to adjust the property values after you deploy an application from one computer to another.

    NI_MinimumBufferSize 32-bit unsigned integer numeric Read/write 1.0 and 2.0 You can use the NI_MinimumBufferSize property to improve the .tdms data writing performance by writing to a file less often. This property can reduce the size of a .tdms file by controlling the number of times the data is written to disk. The NI_MinimumBufferSize property is valid only if the data layout input of the TDMS Write node is non-interleaved. By default, the value of the NI_MinimumBufferSize property is zero. If you set the value at the group level, this node also sets the value of underlying channels whose value is zero. If you set the value at the file level, this node also sets the value of underlying groups and channels whose value is zero. Use of this property and the NI_DiskCacheSize property affects file buffering with .tdms files.
    NI_UpdateChannelName String Write only 1.0 and 2.0 You can use the TDMS Set Properties node to rename groups and channels in .tdms files. Wire NI_UpdateGroupName to the property names input if you want to rename a group and wire NI_UpdateChannelName to the property names input if you want to rename a channel. Wire the new group or channel names to the property values input and wire the group or channel names that you want to replace to the group name or channel name input. If the groups or channels you wire to group name or channel name do not exist, new groups or channels are created with the new names.
    NI_UpdateGroupName

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: DAQExpress does not support FPGA devices


    Recently Viewed Topics