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.