I have the following loop which is meant to reconfigure my limit tags in some UDT's:
for i in range(6):
print i
print v_paths[i]
config = system.tag.getConfiguration(v_paths[i], True)[0] # Get the first (and presumably only) item from the list
print config["path"]
config["expression"] = v_values[i] # Update the 'expression' key in the dictionary
print(config)
system.tag.configure(config["path"], [config], "o") # Pass the modified configuration back as a list
The output of those print lines:
5
KPI/HT_TF_ZONE12/LIMIT_H
[default]KPI/HT_TF_ZONE12/LIMIT_H
{u'tagGroup': u'Every 10 sec', u'historyEnabled': True, u'expression': None, u'query': {bindType=parameter, binding=SELECT ROUND(NVL(UPPER_LIMIT, 95), 1) FROM lu_item_kpv_limits WHERE INVENTORY_ITEM_ID = {[.]ITEM_ID} AND KPV = '{NAME}' AND RESOURCES = '{[.]RESOURCE}'}, u'dataType': Float8, u'sampleMode': TagGroup, u'executionMode': FixedRate, u'executionRate': 60000L, u'historyProvider': u'Historian', u'queryType': Select, u'path': [default]KPI/HT_TF_ZONE12/LIMIT_H, u'datasource': u'Main', u'tagType': AtomicTag, u'name': u'LIMIT_H', u'engUnit': u'psi', u'valueSource': u'expr', u'historySampleRate': 1}
I'm getting the following error:
Error processing edit for tag path '[default]KPI/HT_TF_ZONE12/LIMIT_H/LIMIT_H': Bad_Unsupported("The target path '[default]KPI/HT_TF_ZONE12/LIMIT_H' cannot accept children tags.") provider=default
I'm not sure what's going on here. If you'll notice, the "LIMIT_H" is repeated in the error the first time, but not the second. Anyone have an explanation for this? I'm on version 18.1.18.