Can I write directly to the tag P1 using a tag instead of assigning current _count = Hour_actual0? I want to write Hour_actual0 to P1 directly
if currentValue.value == 5:
current_count = system.tag.readBlocking("[.]Hour_Actual0")[0].value
system.tag.writeBlocking(["[.]P1"], [current_count])
You should be able to.
if currentValue.value == 5:
system.tag.writeBlocking(["[.]P1"], [system.tag.readBlocking("[.]Hour_Actual0")[0].value])
lrose
3
Don't even need to break out the value, as the system.tag.write*
functions will accept a list of QualifiedValues
.
if currentValue.value == 5:
system.tag.writeBlocking(['[.]P1'],[system.tag.readBlocking('[.]Hour_Actual0')])
Though, I would be definitely do this with system.tag.writeAsync()
if not an expression tag and a driven tag group.