Search Historian with WHERE clause

I would like to be able to search for values in the historian that meet certain criteria, for example: all values for a given tag where the value is between a high and low limit. Is this possible with any of the built in tools?

Currently, I have a script that queries the historian and I loop through the result to extract the data I need. Just looking for a better way to do it.


Not in the historian functions, no. If you need such stuff in a binding, you might like my view() expression function from Simulation Aids. (-:

For your view() expression function. Does it support Ignition 8.
What’s the license of it?
Can we use it free in commercial productions?

Well… it did support v8, but broke somewhere around 8.0.2. It is a commercial license, not open source. But I offer it free to use, including in commercial solutions, with free but low-priority support (here on the forum and via email). Fixing it for v8.0.3+ is on my to do list, real soon now… /:

I deploy this on all of my paying customers’ servers, and fully support their use of it. Their upgrades to v8 will therefore make it a priority.

Hi @TimE,

Why don’t you just use a query with a where clause? I think it would go something like:

SELECT myColumns 
FROM myTables 
WHERE tagid = myTags 
AND floatvalue > myLowerValue
AND floatvalue < myUpperValue

If you want to make it dynamic you could script the query as you want.

Thanks for your suggestion
We downloaded the file and install it. It seems not work on ignition 8.0.4 Nightly.

As workaround, we will use a for loop in python script to find the expected cell in the dataset, even it maybe a little lower efficient than the select function of view() expression.

Updated Simulation Aids module tested against v8.0.3 is available here:

Please report any problems you have with it.