System.tag.configure creating a tag with Uncertain_InitialValue

Hello all,

I have the following script that I run in the script console:

tagdict = {
'historyEnabled': True, 
'formatString': u'#,##0.00', 
'historicalDeadband': 0.05, 
'scaleMode': u'Linear', 
'historyProvider': u'Hist', 
'rawHigh': 4095.0, 
'opcItemPath': u'ns=2;s=PLC00.PLC00.P00_TnkLvl@Float', 
'historyMaxAgeUnits': 'HRS', 
'opcServer': u'ServerMain', 
'engUnit': u'Ft', 
'documentation': u'History Floating Point Tag', 
'dataType': u'Float4', 
'alarms': [{'setpointA': 7.0, 'notes': u'Floating Point High Alarm', 'priority': u'High', 'mode': u'AboveValue', 'name': u'High', 'inclusiveA': False}, {'setpointA': 2.0, 'notes': u'Floating Point Low Alarm', 'mode': u'BelowValue', 'name': u'Low', 'inclusiveA': False}], 
'historicalDeadbandStyle': u'Discrete', 
'sampleMode': u'TagGroup', 
'name': u'HistoryFloat', 
'engHigh': 10.0, 
'valueSource': 'OPC'

When the tag gets created, it has Uncertain_InitialValue. The only thing I can figure out is that when I create the tag with history disabled the value will come back in. This gateway is running 8.0.16. Has anyone else run into this behavior?


Your opcItemPath doesn’t look valid for Ignition’s OPC server (should have a device name in square brackets). What kind of server is “ServerMain” ?

Oh ServerMain is the name of our connection to a TopServer. I can confirm that this path works fine if I use it when creating a tag via the GUI in the designer.

EDIT: Top Server is a third party OPC server.

1 Like

I would run a system.tag.getConfiguration on it right after creating it, and then after correcting it, and compare the dictionaries.
Something isn’t setting correctly on the creation.

For posterity. I found the issue:

‘historyMaxAgeUnits’: ‘HRS’

Should be -

‘historyMaxAgeUnits’: ‘HOURS’

Thanks for the help everyone!

1 Like