I have the Tag script as below,
def valueChanged (tagPath, previousValue, currentValue, initialChange, missedEvents):
if not "[.]IsSeries2000":
if currentValue.value != previousValue.value:
index = tagPath.find('RawRead')
tagDir = tagPath[0:index]
value = currentValue.value
print "Yeah"
processMessage(value, tagDir)
def processMessage(value, tagDir):
import traceback
TestType = system.tag.read("%s/TestType" % (tagDir)).value
statusMessage = TestType + ': Not set'
startRequired = 0
if TestType == 'MDR':
system.tag.write("[.]TestEnded", 1)
statusMessage = 'End of MDR test processed.'
indexRootDir = tagDir.find('Machine/')
rootDir = tagDir[0:indexRootDir]
for row in value:
if row[0] == "ML":
system.tag.write("%s/MLS1", row[1])
return None
Where the value of the tag is,
Name Value
Test Time 3.0
Test Temp 145.0
Torque Range 8.0
I-Filter 6.0
ML 2.24
MH 5.8
TS2 dNm 0.63
T10 0.38
T50 0.59
T90 0.94
Max Rate 7.05
TS1 dNm 0.48
tanD@MH 0.308
tanD@ML 0.571
T25 0.46
T30 0.49
crazy result 10.27
T40 0.54
T60 0.66
TC90-TC10 0.57
Basically, I m trying to pull the particular value from this but it’s not doing anything.