Table Of Contents

Read Delimited Spreadsheet (DBL) (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Reads double-precision floating-point data from a file and converts the data to a 2D array.

    This node reads a spreadsheet or spreadsheet file saved in text format. This node opens the file before reading it and closes it afterwards.

    Programming Patterns

    To build a waveform using delimited file data, wire the all rows output of this node to Index Array and index your row. Then, add the t0 and dt values with the Build Waveform node.

    connector_pane_image
    datatype_icon

    format

    A string that uses format specifiers to determine how to convert the data into what you specify.

    Syntax Elements for Creating a Format Specifier

    Use the following syntax elements to create a format specifier for the input string.

    Syntax Element Description
    % Syntax element that begins the format specifier.
    $ (optional) Modifier that specifies the order in which to display variables when used within a formatting node. Include the digit that represents the order of the variable immediately before this modifier.
    - (optional) Modifier that justifies the parameter to the left, within its width, when used within a formatting node.
    + (optional) Modifier that includes mathematical symbols when used within a formatting node.
    spd-note-note
    Note  

    The mathematical symbols appear even when the number is positive.

    ^ (optional) Modifier that formats the number in engineering notation, where the exponent is always a multiple of three.
    spd-note-note
    Note  

    This modifier must be used within a formatting node that has either an e or g conversion code in the format specifier.

    # (optional) Modifier that removes trailing zeros when used within a formatting node. If the number has no fractional part, this modifier also removes the description part.
    0 (optional) Modifier that pads any excess space to the left of a numeric parameter with zeros, rather than spaces, to reach a minimum width when used within a formatting node.
    spd-note-note
    Note  

    Using the - modifier with 0 nullifies the effect.

    Width (optional) Syntax element that specifies an exact field width to use. When used within a formatting node, the Width element specifies the minimum character field with of the output. The field is padded to the left or right of the parameter with spaces, depending on justification.
    spd-note-note
    Note  

    As many characters as necessary are used to format the parameter without truncating it.

    .Precision or _Significant Digits (optional) Syntax element that controls the number of digits displayed when used within a formatting node.
    • .precision—Yields the number of digits to the right of the decimal point.
    • _Significant Digits—Rounds the data to the number of digits you specify.
    spd-note-note
    Note  

    You cannot use precision and significant digits together in a single format specifier.

    {Unit} (optional) Syntax element that overrides the original unit of a VI when you use a node to convert a physical quantity.
    <Embedded Time Format> (optional) Contains a time-specific format string for use with the T (absolute time) and the t (relative time) conversion codes.
    spd-note-note
    Note  

    Only %W, %D, %H, %M, %S, and %u apply to relative time.

    Conversion Codes Characters that specify how to scan or format a parameter.
    • x—Hexadecimal integer
    • o—Octal integer
    • b—Binary integer
    • d—Signed decimal integer
    • u—Unsigned decimal integer
    • f—Floating-point number with fractional format
    • e—Floating-point number in scientific notation
    • g—Uses f or e depending on the exponent of the number
    • p—Floating-point number in SI notation
    • s—Scans a string, matching only up to the next white-space character.
    • [ ]—Scans characters in a set, matching a string that contains only the characters specified between the brackets.
    • % [aeiou]—Scans characters in a set, matching any string that contains only lowercase vowels
    • % [0-9a-zA-Z ]— Scans characters in a set, matching a string that contains numbers, letters, or spaces. You can use a hyphen to specify ranges of characters in the set.
    • % [^,;]— Scans characters in a set, matching any sting of characters up to but not including the first comma or semicolon.
    • T—Absolute time
    • t—Relative time
    Localization Codes Characters that determine whether to use a decimal or a comma to separate the whole number from the decimal part of the number.
    • %,;—Comma decimal separator
    • %.;—Period decimal separator
    • %;—System default separator
    Backslash (\) Codes Characters that specify hex values, spacing, backspaces, and other formatting options.

    Format Specifier Examples for Format

    format string Description
    %.3f Creates a string to represent the number with three digits to the right of the decimal point.
    %s Copies the input string.
    %d Converts the data to integer form using as many characters as necessary to contain the entire number.

    Default: %.3f

    datatype_icon

    file

    The file that this node reads.

    The node opens the specified file without requiring you to call Open/Create/Replace File first.

    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

    delimiter

    A character or string of characters used to separate fields in the spreadsheet text. For example, a value of , (comma) specifies a single comma as the delimiter.

    Default: \t — single tab character

    datatype_icon

    new file

    Path to the newly created file.

    datatype_icon

    all rows

    Array containing each row of data read from the 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.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics