Wonderware Historian: displaying top values

ryangriggs

Lifetime Supporting Member
Join Date
Jun 2016
Location
USA
Posts
198
I am logging a daily flow tag with Wonderware Historian. I need to give the user the ability to get the top 5 daily flows within a specified date range, as well as the date of each. Note that the tag is logged every few seconds, so each day has lots of log entries.

Basically, I first need to find the latest logged value for each day, then sort those in descending order.


Has anyone done anything like this? Any suggestions appreciated.
 
Are you trying to display it on the screen or in a report?


Either way. I would prefer to give the user the option of specifying a date range, then generating a printable report that shows the top 5 flow days inside this date range.


Note that for each day, the flow is logged multiple times throughout the day, so getting the MAX flow value for each day is the way to go. I have been experimenting with wwRetrievalMode='Max' but it doesn't seem to work, as several (null) values are returned in addition to non-null values. Maybe this is the way to go - not sure... ?
 
Instead of a large sort at the days end, maybe it would be easier to maintain a rolling array of the top five values from the start of the day until end.
 
Here's what I tried so far. It seems to work, but how can I be sure it's getting the largest value from each day?


8ogzYJ.jpg



oK7we0.jpg



HNYMdi.jpg



MOCHVK.jpg



wmclKC.jpg



5l4ekJ.jpg
 
Last edited:
Instead of a large sort at the days end, maybe it would be easier to maintain a rolling array of the top five values from the start of the day until end.


The problem with this method is that the user can't specify a date range. It would be a hard-coded range.
 
System Platform

We built a similar query within a system platform object.

We first used the Query tool to build our query and confirm the results. The syntax is different though in the object and you would need to modify it in whatever package you will use to perform the query, but that is the best way to go about it.
 
I have normally used excel with the active x control for wonderware historian client. Usually ran it aromatically every day and had an option for the user to select days. Most people enjoyed this method as they worked previously with excel. there was a lot of VB scripting in the background but I found this to be enjoyable.
 
I have normally used excel with the active x control for wonderware historian client. Usually ran it aromatically every day and had an option for the user to select days. Most people enjoyed this method as they worked previously with excel. there was a lot of VB scripting in the background but I found this to be enjoyable.

Yes...
Wonderware Historian Client is the easiest way to "mine" data.
You set parameters (tags,date range,time range...etc) and Historian Client builds SQL commands in background, report viewed printed on a time basis, and can be pushed to web page.
AND you can copy the SQL command to a button.

It may run a litte under $1500 per license, but worth it in say of use.

IMHO
 

Similar Topics

Hi, We are setting up an Aveva Plant SCADA node with the intention to connect it to a Wonderware Historian node. Everywhere I look online I see...
Replies
1
Views
156
So I'm trying to make a tag I created in WonderWare Historian display the correct tag values on the inTouch client but it is currently showing...
Replies
12
Views
1,511
Hello there, Our plant is running Wonderware Historian on a Virtual Server and every few days I'm losing comms to my PLCs. Usually I can simply...
Replies
3
Views
2,056
Hi all, I found some interesting issue from my Wonderware environment. At my Trend table option, if i select "both", the Trend table is not...
Replies
2
Views
3,644
Hello, I want to monitor Wonderware historian's heartbeat and trigger a fault if Historian is not communicating /offline in PLC. Currently my...
Replies
0
Views
785
Back
Top Bottom