Write Tag
- Updated2023-02-17
- 4 minute(s) read
Write Tag
Writes a data value to a tag, or to a tag proxy if it is configured to have write access.
Inputs/Outputs

tag/proxy ref in
The reference to the tag endpoint, or tag proxy endpoint if configured to have write access, to which to write a data value.

value
The data value that this node writes to the tag or tag proxy.
Data Type of value

timestamp
The timestamp you want to associate with the data value that this node writes to the tag.
This input is available only if all of the following conditions are met:
- When you create the tag, you enable the Has Timestamps? property.
- You wire a reference to that tag to tag ref in.
If you do not wire this input and Has Timestamps? is enabled, this node automatically generates the current timestamp and associates it with the data value in the tag.
Associating Timestamps with Tag Data
Complete the following steps to associate a timestamp with the data value stored in a tag.
- Navigate to the shared resource collection document where you created the tag and select the tag you want to modify.
Note Shared resource collection documents have the .grsc file extension.
- 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 the tag 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.

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

tag/proxy ref out
The reference to the tag endpoint or tag proxy endpoint to which this node wrote a data value.

error out
Error information.
The node produces this output according to standard error behavior.
What Is a Tag?
A tag is single-point, latest value data that you can access from multiple documents within a project. A tag can store a single value of any data type that represents the state of a process. Tags are similar to global variables in text-based programming languages.
You can create a tag either dynamically, using the Configure and Create Tag node on the diagram, or statically, in the shared resource collection file.
You can create a tag to access the same data from multiple VIs within a project.
What Is a Tag Proxy?
A tag proxy is a reference that is local to part of the application that mirrors the value of the actual tag to which it is linked in another location in the application. You use a tag proxy to access data that is in another location in the application. You can read from and optionally write to a tag proxy only after the tag proxy links to a tag.
Using a Tag Constant
Complete the following steps to statically create and configure a tag.
- Create or open a shared resource collection document.
Note Shared resource collection documents have the .grsc file extension.
- Expand the Tag section and click Create New.
- Configure the data type, initial value, and other properties of the tag in the Item tab.