system.tag.editTag

Description

Edits an existing tag in Ignition.

Syntax

system.tag. editTag( tagPath, attributes, parameters, accessRights, overrides, alarmList, alarmConfig )

  • Parameters

String tagPath - The full path to the tag you want to edit. Note: you can specify the tag provider name in square brackets at the beginning of the parentPath string. Example: "[myTagProvider]MyTagsFolder". If the tag provider name is left off then the project default provider will be used.

PyDictionary attributes - The tag's configuration attributes.

PyDictionary parameters - The parameters for a UDT instance tag.

String accessRights - The access rights for the tags. Possible values are Read_Only, Read_Write, and Custom.

PyDictionary overrides - All of the overrides for a UDT instance tag.

String alarmList - List of alarms for the tags.

PyDictionary alarmConfig - The alarm configuration for the tag.

  • Returns

nothing

  • Scope

All

If called in the gateway scope, a tag provider must be specified.

Associated attributes:

Code Examples
Code Snippet
#Example 1: Edit OPC tag
system.tag.editTag(tagPath="Tag1",
attributes={"OPCServer":"Ignition OPC-UA Server", "OPCItemPath":"[MLX]N7:2"})
Code Snippet
#Example 2: Edit UDT instance parameters
system.tag.editTag(tagPath="Tag5", parameters={"DeviceName":"CLX", "MotorNumber":2})
Code Snippet
#Example 3: Edit UDT instance and override certain parameters
system.tag.editTag(tagPath="Tag8", overrides={"STATUS":{"ScanClass":"Default"}})
Code Snippet
#Example 4: Edit UDT instance and override multiple parameters
system.tag.editTag(tagPath="Tag8",
overrides={"STATUS":{"ScanClass":"Default", "Enabled":"false"}})
Code Snippet
#Example 5: Edit UDT instance and remove certain overrides
system.tag.editTag(tagPath="Tag8", parameters={"Param":"Something"},
overrides={"STATUS":{"ScanClass":None}})
Code Snippet
#Example 6: Enable history on a tag, set the historical scanclass to "Default Historical", and set the History Provider to the "Data" provider
system.tag.editTag(tagPath="Folder/Tag",attributes={"HistoryEnabled":True, "HistoricalScanclass":"Default Historical", "PrimaryHistoryProvider":"Data"})