Aveva Historian Scenarios Guide: Formerly Wonderware
Aveva Historian Scenarios Guide: Formerly Wonderware
© 2020 AVEVA Group plc and its subsidiaries. All rights reserved.
No part of this documentation shall be reproduced, stored in a ret rieval system, or transmitted by any
means, electronic, mechanical, photocopying, rec ording, or otherwise, without the prior written
permission of AVEVA. No liability is assumed with respect to the use of the information contained herein.
Although precaution has been taken in the preparation of this documentation, A VEVA assumes no
responsibility for errors or omissions. The information in this documentation is subject to change without
notice and does not represent a commitment on the part of AVEVA. The soft ware described in this
documentation is furnished under a license agreement. This soft ware may be used or copied only in
accordance with the terms of such license agreement.
ArchestrA, Aquis, Avantis, Citect, DYNSIM, eDNA, EYESIM, InBatch, InduSoft, InStep, Int elaTrac,
InTouch, OASyS, PIPEPHASE, PRiSM, PRO/II, PROV ISION, ROMeo, SIM4ME, SimCentral, SimSci,
Skelta, SmartGlance, Spiral Software, Termis, WindowMaker, WindowViewer, and Wonderware are
trademarks of AVEVA and/or its subsidiaries. An extensive listing of AVEVA trademarks can be found at:
https://sw.aveva.com/legal. All other brands may be trademarks of their respective owners.
Publication date: Wednesday, November 11, 2020
Contact Information
AVEVA Group plc
High Cross
Madingley Road
Cambridge
CB3 0HB. UK
https://sw.aveva.com/
For information on how to cont act sales and customer training, see https://sw.aveva.com/contact.
For information on how to cont act technical support, see https://sw.aveva.com/support.
2
AVEVA™ Historian Scenarios Guide formerly Wonderware
Contents
Welcome .................................................................................................................................... 5
AVEVA Historian Documentation Set ......................................................................................... 5
3
AVEVA™ Historian Scenarios Guide formerly Wonderware
Welcome
In your plant, you work hard to manage large amounts of data. While you and other AVEVA Historian
customers may have very different processes and products, you probably do share some key issues
around managing your data and using it to better run your operations.
This book discusses ten common scenarios where AVEVA Historian can help. They are:
1. Using hourly and daily reports.
2. Tracking inventory and production with packing line counters
3. Tracking liquid and gas use with custody meters.
4. Analyzing cycle time for your process.
5. Calculating the total flow.
6. Calculating downtime statistics.
7. Pinpointing reasons for downtime.
8. Filling in the gaps in your data.
9. Understanding and using data.
10. Getting summary statistics when a certain condition applies
5
AVEVA™ Historian Scenarios Guide formerly Wonderware Welcome
6
AVEVA™ Historian Scenarios Guide formerly Wonderware
7
AVEVA™ Historian Scenarios Guide formerly Wonderware
9
AVEVA™ Historian Scenarios Guide formerly Wonderware Scenario 2: Track inventory and production with packing line counters
wwRetrievalMode = 'Counter'
In the following example, the rollover value for the TotalP roduced.Counter tag is set to 0. In a time span
of 3 hours, the tag increments from 0 to 9999 twice. The following query returns the an hourly total count
within the queried time span. The QualityDetail of 212 indicates that a counter rollover occurred during
the report ed time range.
10
AVEVA™ Historian Scenarios Guide formerly Wonderware
11
AVEVA™ Historian Scenarios Guide formerly Wonderware
Value
RoundTrip Retrieval
C0 C1 C2 C3
PC0 Round-trip PC1 PC2 PC3
ON
OFF Gap
Round-trip
1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29
Time
TC0 TC1 TC2 TC3
RoundTrip calculates the time a state begins until the time the same state begins again. For a discrete
tag that simply tracks on and off, RoundTrip mode returns two rows per cycle. For example, when
querying a discrete tag, RoundTrip can calculate the time bet ween when a motor starts until the next time
it starts, and when the motor stops until the next time it stops.
Example: Analyzing Cycle Time with RoundTrip Retrieval
To use the RoundTrip retrieval mode, set the following parameter in your query:
wwRetrievalMode = ‘RoundTrip’
This query uses RoundTrip retrieval:
13
AVEVA™ Historian Scenarios Guide formerly Wonderware Scenario 4: Analyze cycle time for your process
AND wwStateCalc='MinContained'
AND wwTimeStampRule='start'
In these results, the value "0" shows when the valve was off and "1" when it was on.
The resulting rows show the average amount of time for each state and have a timestamp of the query
end time (the default).
14
AVEVA™ Historian Scenarios Guide formerly Wonderware
wwRetrievalMode = 'Integral'
In this example, the value is computed for each of five one -minute cycles. The wwQualityRule parameter
ensures that only points with good quality are used in the computation; data points with doubtful quality
are discarded.
15
AVEVA™ Historian Scenarios Guide formerly Wonderware Scenario 5: Calculate the total flow
The Value column shows the total flow for eac h 4-hour cycle. To calculate the total flow for the entire
period, add the flow values together.
16
AVEVA™ Historian Scenarios Guide formerly Wonderware
17
AVEVA™ Historian Scenarios Guide formerly Wonderware Scenario 6: Calculate down tim e statistics
18
AVEVA™ Historian Scenarios Guide formerly Wonderware
19
AVEVA™ Historian Scenarios Guide formerly Wonderware Scenario 7: Pinpoint reasons for downtime
20
Scenario 7: Pinpoint reasons for downtime AVEVA™ Historian Scenarios Guide formerly Wonderware
AND Value = 1
AND wwRetrievalMode = 'ValueState'
AND wwStateCalc = 'Percent'
AND wwCycleCount = 6
The results of this query are:
DateTime TagName vValue StateTime wwStateCalc
21
AVEVA™ Historian Scenarios Guide formerly Wonderware
23
AVEVA™ Historian Scenarios Guide formerly Wonderware Scenario 8: Fill in data gaps
If the query specifies Optimistic, the results include a PercentGood column indicating whether all the
data was "good" (100) or included some combination of "bad" and "uncertain" data (anything less than
100).
For the illustration above, there is no previous dat a and no available data in the first cycle, so it is
skipped. At the second cycle boundary, the value 0 is returned, because there was a gap in the data for
the entire first cycle. In the second cycle, there are two points, P1 and P2. The query uses P2 as the end
value of the cycle and infers a start value of the cycle from P1. At the t hird cycle boundary, Tc2, the query
returns P2 – P1. Similarly, at the last cycle boundary, the query returns P4 – P3.
Example: Masking Gaps in Your Data
At times, the results of a query might return null values, as in the following example:
You can improve the us efulness of your data by adding this statement:
wwQualityRule = 'Optimistic'
For example:
24
Scenario 8: Fill in data gaps AVEVA™ Historian Scenarios Guide formerly Wonderware
25
AVEVA™ Historian Scenarios Guide formerly Wonderware Scenario 9: Understand and use data
Note: Although in many cases OPCQuality and QualityDetail use the same codes to indicate similar
concepts (for example, "192" indicates normal "good" values), they will often be different and should not
be used interchangeably.
26
Scenario 9: Understand and use data AVEVA™ Historian Scenarios Guide formerly Wonderware
Note: Although a quality detail of 65536 is used to indicate block gaps, NULL values are not produced for
block gaps.
Using WWQualityRule
AVEVA Historian provides three different options for interpreting the stored OPCQuality:
Good: Filters out "uncertain" values, as if they did not exist, and converts "bad" values to NULL.
Extended: Includes "unc ertain" values, but takes them out of the "PercentGood" calculations and
makes the OPCQuality "uncertain" for calculated results that include included them. Extended also
converts any "bad" valuesto NULL.
Optimi stic: Filters out "bad", but is otherwise similar to "extended".
Examples: Using OPCQuality to Refine Results
Suppose you wanted a report to tell you the average production level fo r a certain storage tank for each
8-hour shift. You could run this query:
To force a query to exclude points with uncertain OP C quality, set wwQualityRule to Good. For example,
you can change the previous example to this:
27
AVEVA™ Historian Scenarios Guide formerly Wonderware Scenario 9: Understand and use data
Finally, queries to AnalogSummaryHistory use the Optimistic quality rule exclusively . For example:
28
Scenario 10: Get summary statistics when a certain condition appliesAVEVA™ Historian Scenarios Guide formerly Wonderware
29
AVEVA™ Historian Scenarios Guide formerly Wonderware Scenario 10: Get summary statistics when a certain condition applies
First, the query defines a batch by instance that the valve is open. Then, it calculates the total volume of
the flow for that batch and calculates a weighted average by duration. Finally, it calculates an "average of
averages" for the batch.
Note: This example correctly calculates the overall average for each state in the "A verage" column by
weighting the duration of each state. As explained by Simpson’s Paradox, the simpler, "A vgOfA vg"
calculation is not statistically accurate and can differ significantly with some data sets.
Example: Finding the Lowest Pressure Today While a Pump Was Running
This example finds today's lowest pressure reading for a pump while it was running.
30