Skip to main content
InSource Solutions

TN Hist220 Methods For Reading Values From A Historian Tag

insource logo large.jpg

 

Description

This article describes how to query Historian to ensure that data for a tag is being read and logged.

 

  • Author: Daniel London
  • Published: 06/19/2015
  • Applies to: Historian (All Versions)

 

Details

To get live Historian tag values, you will first use wwclient to read info from one of the tags.

 

Create a connection in wwclient by going to Connections -> Create and type in the information below and click Create. If the Historian server is on the local machine enter localhost as the Node. For Application and Topic enter the values shown below (aahiosvrsvc and tagname). Leave the Connection Type as IOT.

 wwclientconnection.jpg

 

Verify that the connection was created and click Done.

wwclientconnectioncreated.JPG

 

Next, click Item and enter the item name that you will be querying from Historian. For testing purposes we are going to use SysTimeSec as the item to be advised (If you were querying a specific tag from Historian you would enter that instead). Click AdviseEx.

AdviseItem.JPG

 

The live values for the item are displayed in wwclient.

ItemResult.JPG

 

You can also query the Runtime database in Microsoft SQL Management Studio to see if values are being stored in the database for a particular Historian tag. Ensure that the Runtime database is selected for the SQL query and type the Select statement outlined below. For testing purposes we are going to use SysTimeSec again. If you are querying a particular tag from Historian you would enter that instead.

Select * from History

Where Tagname = 'SysTimeSec'

After executing the query, the results will then display the records that have been logged for the tag. These are the values that Historian has stored.

 

Note: It is recommended that you filter the query based on Date and Time, otherwise the result set could be very large.

SQL.jpg