Table Of Contents

Read Tag (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Returns the data value stored in a tag.

    connector_pane_image
    datatype_icon

    tag ref in

    The reference to the tag from which you want to read the data value.

    datatype_icon

    data type

    The data type of the tag you want to read from.

    The data type of this input automatically changes to match the data type of the tag you want to read from. If this node cannot determine the data type of the tag at run time, this node may return an error if you do not wire a value to this input.

    Default: 0

    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

    tag ref out

    The reference to the tag that this node read the data value from.

    datatype_icon

    value

    The data value stored in the tag.

    datatype_icon

    timestamp

    The timestamp associated with the data value.

    This output is available only if you enable the Has Timestamps? property of the tag.

    Associating Timestamps with Tag Data

    Complete the following steps to associate a timestamp with the data value stored in a tag.

    1. Navigate to the shared resource collection document where you created the tag and select the tag you want to modify.
      spd-note-note
      Note  

      Shared resource collection documents have the .grsc file extension.

    2. On the Item tab, enable the Has Timestamps? checkbox.

    If the tag contains an initial value, the tag now associates that value with the timestamp when it was created.

    You can also associate a custom timestamp to the data value that you write to a tag. If you wire a timestamp to the Write Tag node when writing a new data value to a tag, the node then associates that timestamp with the new data value.

    spd-note-note
    Note  

    Associating a timestamp with tag data may slow down the performance of your application. Only associate timestamps with tag data when necessary.

    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.

    What is a Tag?

    A tag can store a single value of any data type. Tags are similar to global variables in text-based programming languages. You can create a tag to access the same data from multiple VIs within a project.

    Creating and Configuring a Tag

    Complete the following steps to create and configure a tag.

    1. Create or open a shared resource collection document.
      spd-note-note
      Note  

      Shared resource collection documents have the .grsc file extension.

    2. Expand the Tag section and click Create New.
    3. Configure the data type, initial value, and other properties of the tag in the Item tab.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics