Examples: Using the Built-in Functions

Retrieving the Current value

You can use the current value function to retrieve the current value of an existing Historian tag.
Result=Historian.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=Historian.CurrentValue('Tag1')
y=Historian.CurrentValue('Tag2')
if x > y:
 Result= x
else:
 Result= y

Add the Values of Two Tags

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