Equipment Note entered via Tag Collector Script Function 3.0
Problem
you are using system.mes.updateTagCollectorValue(equipmentPath, collectorType, key, lastTimeStamp, value)
to update a note and it is not showing in your Downtime Table (but you can see it in your Value Editor!)
Solution
You may have cells under your Line where the State is being collected.
- A Note is entered
- 1) at the Line Level while the State is at the Cell Level
- 2) the TimeStamp of the State and the TimeStamp of the Note MUST be identical


Here is a method to do this via script:
|
equipmentPath = '[global]\Nuts Unlimited\SiteOne\Cust\InitCell' collectorType = 'Equipment Note' key = ''
date = system.date.getDate(2020, 1, 6) dateTime = system.date.setTime(date, 15, 2, 0)
print "equipmentPath [%s]", equipmentPath print "collectorType [%s]", collectorType print "dateTime [%s]", dateTime
value = "Note via updateTagCollectorValue and some TimeStamp" print "value [%s]", value
equipmentPath = '[global]\Nuts Unlimited\SiteOne\Cust\InitCell\ICG\SICG\IC01' collectorType = 'Equipment State' lastTimeStamp = system.mes.getTagCollectorLastTimeStamp(equipmentPath, collectorType, key)
print "lastTimeStamp [%s]", lastTimeStamp
equipmentPath = '[global]\Nuts Unlimited\SiteOne\Cust\InitCell' collectorType = 'Equipment Note' value = "Note via updateTagCollectorValue with correct TimeStamp" system.mes.updateTagCollectorValue(equipmentPath, collectorType, key, lastTimeStamp, value) |
Related articles
system.mes.updateTagCollectorValue