The following table lists all the data types available for Tags in Ignition.
|Datatype||String Value||Integer Value|
Array and Dataset Data Types
The Array and Dataset data types available on Tags allow for multiple data points to be stored in a single Tag. Configuring a Tag as an array or dataset is as easy as changing the data type in the Tag Editor.
Many OPC servers and drivers already support array type Tags, and now each element in the array can easily be represented with the array data types in Ignition. Additionally, array data types can be used with devices that do not support array types, and will instead expose each bit in the value.
Array Tag Write-Back
OPC Array Tags now support writing back to the device. How this is done can vary, depending on the type of OPC Server in use. Some OPC Servers support writes to individual array elements, where a write would occur just like any other Tag write. However, some OPC Servers do not support individual element writes, which means the whole array will need to be written back to the array tag, even if only a single element is changing.
Array Alarm Example
Because the core data type of each element in the array is the same, it is possible to apply Tag History, Alarming, or Scaling configurations onto the array, and these configurations will be inherited by each element.
- For this example, create the Tag WriteableInteger1.
- In the Tag Browser, right click on the WriteableInteger1 Tag and choose Copy.
- Right click on the Tag's folder, and choose Paste.
- Ignition creates a copy of the first tag and names it WriteableInteger2. Double click on the new Tag to open the Tag Editor.
- In the Tag Editor, change the Data Type to Integer Array. Then click OK.
- Once the Tag finishes re-subscribing, the value for WriteableInteger2 will now show "Array" instead of the previous value. Expanding the Tag reveals a new Value section, and expanding this section will show the value of each bit.
- Double click on the WriteableInteger2 Tag again to edit it. Scroll down to the Alarming section.
- Click on the Edit icon.
- Create a new alarm with Mode set to Equal, but change the Setpoint to "1," and then click Commit.
- Click OK. Now an alarm will be active for each element that is set to 1.
Dataset Tags allow multiple rows and columns worth of data to be stored in a Tag. Each column is exposed as a separate folder in the Tag (i.e., the "name" folder in the image below). Dataset Tags can be driven by a query, so it's possible to query for multiple columns on a row in a single Tag. This is more efficient than using multiple query Tags (and thus multiple queries) to retrieve the same data.
While dataset tags are convenient, the Tag History and Alarm systems do not support tags with dataset types.