Examples of Using the Python Collector (Built-In Functionality)

Retrieving the Current value

You can use the current value function to retrieve the current value of an existing Historian tag.
Result=CurrentValue('Tag1’)
Get the current value of two tags and return the greater value of the two value:

Return the Greater Value of Two Tags

x=CurrentValue('Tag1')
y=CurrentValue('Tag2')
if x > y:
 Result= x
else:
 Result= y

Add the Values of Two Tags

Result=CurrentValue(‘Tag1')+CurrentValue('Tag2')