Table Of Contents

Storing Historical Tag Values

Version:
    Last Modified: November 7, 2019

    Configure how long or how many historical tag values you store on your SystemLink server or SystemLink Cloud account.

    What to Use

    You can find the SystemLink APIs on the Data Communication palette in LabVIEW and LabVIEW NXG.

    What to Do

    1. On the client, create the following diagram in a VI to configure how you want to store tag values on your SystemLink server.

      Customize the gray sections for your unique programming goals.

    Initiate a connection with your SystemLink server or SystemLink Cloud account using Open Configuration .
    spd-note-note
    Note  

    This example uses a subVI to allow the user to select the connection settings on the front panel.

    Build Path identifies the system and top-level application that generates the tag as a tag path.
    Open Tag opens a reference to the tag on your SystemLink server or SystemLink Cloud account. If a reference does not exist, this function creates one.
    Configure Retention sets how long or how many historical tag values you want to store on your SystemLink server or SystemLink Cloud account.
    Write Tag specifies tag values to the tag reference Open Tag opens or creates. You can see these values on SystemLink server or SystemLink Cloud account in real time.
    Wait enforces a minimum time to wait before sending the tag value to your SystemLink server or SystemLink Cloud account.
    Delete Tag removes tag values from your SystemLink server or SystemLink Cloud account.
    Close Configuration invalidates any open reference to objects this VI creates and closes connections associated with the configuration.

    Troubleshooting

    If you encounter errors, try the following troubleshooting strategies:
    • If you receive timeout errors, connection refused errors, or 404 errors, verify the following things:
      • The VI is connected to the correct server machine.
      • The NI Web Server is configured, running on the server machine, and accepts remote connections.
      • The web service you want to use is installed on the server machine.
    • If Open Configuration (Auto) returns an error, verify the application is on the server machine or a system managed by the server.
    • If you receive a 401 unauthorized errors, verify the credentials you specify are correct and have sufficient permission specified in the NI Web Server.
      spd-note-note
      Note  

      Verify the permissions for each SystemLink API.

    • If your application is a WebVI and you receive network errors, verify you enabled CORS for web servers running on the same machine as clients in NI Web Server.
    • If you application is a WebVI and you want to deploy it, use Open Configuration (Auto) and log into the web server before accessing the WebVI.

    Recently Viewed Topics