Support Forums
Retrieving logged data for use in calculation tag

I'm wanting to retrieve logged data for use in a calculation tag expression. Basically "[tagNamevalue] @ [datetime]". Any way of doing this?

I'd also like to be able to generate averages and min-max values based on a user defined period.

I'm wanting to retrieve logged data for use in a calculation tag expression. Basically "[tagNamevalue] @ [datetime]". Any way of doing this? I'd also like to be able to generate averages and min-max values based on a user defined period.
edited Jun 22 '23 at 6:03 pm

If you wanted to write a custom tag type for this, you would probably use the GetTagHistory() function but it is script only and won't run in a standard calculation tag.

Help on GetTagHistory: https://www.vtscada.com/help/Content/Pro_Functions/GetTagHistory.htm

If you want to do this without custom script, you can setup the built in REST API and use the JSON/XML driver to query the historian on localhost and return the response (JSON format) to one or more tags. It's a bit of a workaround but isn't very difficult to configure.

If you wanted to write a custom tag type for this, you would probably use the GetTagHistory() function but it is script only and won't run in a standard calculation tag. Help on GetTagHistory: https://www.vtscada.com/help/Content/Pro_Functions/GetTagHistory.htm If you want to do this without custom script, you can setup the built in REST API and use the JSON/XML driver to query the historian on localhost and return the response (JSON format) to one or more tags. It's a bit of a workaround but isn't very difficult to configure.

Trihedral Engineering Ltd.

68
1
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft