Proficy* Historian - GE Intelligent Platforms: Support Home

Proficy* Historian - GE Intelligent Platforms: Support Home

Proficy Historian Getting Started Guide

Implementing Tag Level Security

In addition to defining iH Tag Admins that have the power to create, modify, and remove tags, you can also define individual tag level security to protect sensitive tags.

This tag level security can be set in the Historian Administrator. You do not need to use the Historian Security

Groups for this security setting. You may use one of the Windows pre-defined groups (power users, for example) or create your own separate group specifically for this function. For more information on creating and adding groups, refer to the Setting up Historian Security Groups section.

NOTE: Only users defined as iH Security Admins have rights to set individual tag level security, browse and query all tags in the Historian Administrator.

To set Tag Level Security for an individual tag:

1. Open the Historian Administrator.

2. Click on the Tags link. The Tag Maintenance screen appears.

3. Select a tag (or group of tags) from the Tag Name section of the Tag Maintenance screen.

4. Click on the Advanced Tab to display the advanced tag options.

5. In the Read Group, Write Group, or Administer Group field, select the security group that you wish to assign to the tag from the drop-down list.

The drop-down list automatically lists all security groups that are defined in your Windows security environment.

For example, if an iH Security Admins user selects a tag and chooses power users from the Read Group dropdown list, in addition to members of the iH Security Admins group, only a member of the power users group will be able to read data for that tag. Even a member of the iH Readers group will not be able to access data for that tag, unless they are also defined as a member of the power users group.

Retrieving Data from Historian

After data collection, the Historian Server compresses and stores the information in the Archive Database. Any client application can retrieve archived data through the Historian API. The Historian API is a client/server programming interface that maintains connectivity to the Historian Server and provides functions for data storage and retrieval in a distributed network environment.

You can retrieve data from Historian using one of the following:

70

Getting Started with Historian

• iFIX

CIMPLICITY

Excel Add-In

Custom SDK Applications

OLE DB

API

Charting

Sampling and calculation modes are used on retrieval of data that has already been collected to the archive.

These modes do not effect data collection. Some sampling modes are suited to compressed data and should be used when collector compression or archive compression is used.

Sampling Modes

Sampling modes are used to specify how the data will be retrieved from Historian. Several modes are available, such as CurrentValue, Interpolated, Calculated and RawByTime. Sampling modes are specified in the client you use to retrieve data from Historian.

For more information, refer to the Advanced Topics section in the online help.

Descriptions and common usages of the sampling modes in Historian are as follows:

Sampling Mode Results

CurrentValue Retrieves the most recent data sample value received by the archiver, of any data quality. This does not necessarily produce the most recent raw data sample, as archive compression may not have stored the most recent raw sample.

The sample has a time stamp, a value, and a quality. The time stamp returned is not typically the current time; it is the time stamp as sent by the collector. If you have a slow poll rate or if collector compression is enabled, the time stamp may be much earlier than the current time.

71

Proficy Historian Getting Started Guide

72

RawByTime

RawByNumber

Interpolated

Returns all raw samples of all qualities with a time stamp greater than a specified start time, and less than or equal to a specified end time. The

RawByTime sampling mode will not return a sample equal to the start time.

Returns a specified number of samples of all qualities with a time stamp greater than or equal to the start time. The RawByNumber sampling mode will return a sample with a time stamp equal to the start time if one exists

You must also specify a direction and number of samples when using this sampling mode.

When archive or collector compression is used, a minimal number of actual data samples are stored in the archive. When this data is retrieved, interpolation can be performed to create an evenly spaced list of most likely real-world values (since the actual values have been removed from the archive through the compression algorithm).

The Interpolated sampling mode is also useful for data samples that haven't undergone archive compression. For example, you may want to plot data along an interval that doesn't match the collected raw samples.

Using the Interpolated sampling mode would give you the most likely real-world values for the specified period.

Typically, you use the interpolated sampling mode when data is not collected on a set time schedule, or if you want to see the results returned in an interval that is slower than the collection rate. For example, these instances show when you can use interpolated mode to make evenly spaced values:

• A tag is collected as "unsolicited." In this case, we really do not know what the time interval is between collected values.

• The deadband and/or archive compression for a tag results in non-evenly spaced collection intervals.

• A tag is collected once per 8-hour shift, but you want to see it displayed in 1 hour intervals with a linear slope between points.

Getting Started with Historian

InterpolatedtoRaw

Lab

LabtoRaw

Trend

When you request interpolated data, you specify an interval or number of samples. If the actual stored number of raw samples is greater than required, you will get interpolated data as described above. If the actual number of stored samples are less than the required, then you will get the raw samples. In this way, the needs of trending detail and application load are balanced.

This mode is best used when querying compressed data because the Data

Archiver can switch to the more efficient raw data query.

The Lab sampling mode only returns the collected values, without any interpolation of the value. The collected value is repeated for each interval until there is a change in the raw data sample's value.

Lab sampling is most often used to create a step chart rather than a smooth curve.

Use Lab sampling instead of interpolated if you only want true collected values returned. The Lab sampling mode is generally not useful on highly compressed data. Use interpolated sampling instead.

LabtoRaw is an extension to Lab mode of sampling and similar to

InterpolatedtoRaw mode where you will be switched to raw data or lab when the actual data samples are fewer than the requested samples.

The Trend sampling mode was designed to produce maximum performance when retrieving data for plotting, particularly over long time periods.

The trend sampling mode returns the maximum and minimum value collected during each interval. When plotted, this makes it possible to display an accurate representation of the data that won’t miss any extremums, by only retrieving a minimum of points.

For example, a trend of 1 year of data with a 1 day interval will return 730 values consisting of the 365 minimums and 365 maximums for each day of the year.

73

Proficy Historian Getting Started Guide

TrendtoRaw

Calculated

RawByFilterToggle

TrendtoRaw retrieves raw data between a given intervals when the actual data samples are fewer than the requested number of samples.

Returns samples based on a selected Calculation mode. Refer to

Calculation Modes for more information.

RawByFilterToggle returns filtered time ranges. The values returned are 0 and 1. If the value is 1, then the condition is true and 0 means false.

This sampling mode is used with the time range and filter tag conditions.

The result starts with a starting time stamp and ends with an ending timestamp

Calculation Modes

Calculation modes are used when the sampling mode is set to Calculated. The data type of all calculated values will be DoubleFloat except for MinimumTime, MaximumTime, FirstRawTime and LastRawTime which will be a Date. The datatype of the values of FirstRawValue and LastRawValue will be the same as that of the selected tag.

The calculation modes in Historian are:

Calculation Mode Results

Count Displays the number of raw samples in the specified interval. This only indicates the count and does not display the actual values or qualities of the samples.

The Count calculation mode is useful for analyzing the distribution of raw data samples. If you have a higher number of raw samples than expected, you may decide to implement collector or archive compression. If samples are missing then you may want to slow your collection rates

74

Getting Started with Historian

State Count

State Time

Minimum

MinimumTime

Maximum

MaximumTime

Displays the number of times a tag has transitioned to another state from a previous state. A state transition is counted when the previous good sample is not equal to the state value and the next good sample is equal to state value.

Displays the duration that a tag was in a given state within an interval.

Displays the minimum value in a specified interval with good data quality. This value may be raw or interpolated.

NOTE: The Minimum and MinimumTime calculation retrieve two additional samples per interval; one is interpolated at the interval start time and the other is interpolated at the interval end time. These samples are used to determine the min or max just like any raw value.

Displays the time stamp of the minimum value in a specified interval.

See the note in Minimum for additional information.

Displays the maximum value in a specified interval.

NOTE: The Maximum and MaxmimumTime calculation internally retrieve two additional samples per interval; one is interpolated at the interval start time and the other is interpolated at the interval end time. These samples are used in the min or max just like any raw or interpolated value.

Displays the time stamp of the maximum value in a specified interval.

See the note in Maximum for additional information.

75

Proficy Historian Getting Started Guide

76

RawAverage

Average

OPCQOr and OPCQAnd The OPCQOr is a bit wise OR operation of all the 16 bit OPC qualities of the raw samples stored in the specified interval.

The OPCQAnd is a bit wise AND operation of all the 16 bit OPC qualities of the raw samples stored in the specified interval.

Total Retrieves the time-weighted total of raw and interpolated values for each calculation interval. The collected value must be a rate per 24 hours. This calculation mode determines a count from the collected rate.

RawTotal

StandardDeviation

Displays the arithmetic average of the raw values in a specified interval with good data quality. This is useful only when a sufficient number of raw data values are collected.

Similar to RawAverage, but performs a special logic for time weighting and for computing the value at the start of the interval. This is useful for computing an average on compressed data.

RawStandardDeviation

TimeGood

Displays the arithmetic sum of raw values in a specified interval.

Displays the time-weighted standard deviation of raw values for a specified interval.

Displays the arithmetic standard deviation of raw values for a specified interval.

Displays the amount of time (in milliseconds) during an interval when the data is of good quality and matches filter conditions if the filter tag is used.

Getting Started with Historian

FirstRawValue

FirstRawTime

LastRawValue

LastRawTime

Returns the first good raw value for a specified time interval.

Returns the timestamp of the first good raw for a specified time interval.

Returns the last good raw value for a specified time interval.

Returns the timestamp of the last good raw for a specified time interval.

TagStats Using TagStats, you can return multiple calculation modes for a tag in a single query.

NOTE: You can also use INCLUDEBAD or FILTERINCLUDEBAD as query modifiers to include bad quality data. For more information, refer INLUDEBAD and FILTERINCLUDEBAD sections in Advance Topics.

Query Modifiers

Query Modifiers are used for retrieving data that has been stored in the archive. They are used along with sampling and calculation modes to get a specific set of data. The following are the available query modifiers in

Proficy Historian.

For more information, refer to the Query Modifiers section.

Descriptions and common usages of Query Modifiers in Historian are as follows:

77

Proficy Historian Getting Started Guide

Query Modifier

ONLYGOOD

INCLUDEREPLACED

Results

The ONLYGOOD modifier excludes bad and uncertain data quality values from retrieval and calculations. Use this modifier with any sampling or calculation mode but it is most useful with Raw and CurrentValue queries.

All the calculation modes such as minimum or average exclude bad values by default, so this modifier is not required with those.

Normally, when you query raw data from

Proficy Historian, any values that have been replaced with a different value for the same timestamp are not returned. The

INCLUDEREPLACED modifier helps you to indicate that you want replaced values to be returned, in addition to the currently retrievable data. However, you cannot query only the replaced data and the retrievable values that have replaced other the values.

You can query all currently visible data and get the data that has been replaced.

This modifier is only useful with rawbytime or rawbynumber retrieval. Do not use it with any other sampling or calculation mode.

78

Getting Started with Historian

INCLUDEDELETED

ONLYIFCONNECTED/ONLYIFUPTODATE

The INCLUDEDELETED modifier retrieves the value that was previously deleted. Data that has been deleted from the archiver is never actually removed but is marked as hidden. Use the INCLUDEDELETED modifier to retrieve the values that were deleted, in addition to any non-deleted values during the query time period.

This modifier is only useful with rawbytime or rawbynumber retrieval. Do not use it with any other sampling or calculation mode.

The ONLYIFCONNECTED and

ONLYIFUPTODATE modifiers can be used on any sampling or calculation mode to retrieve bad data if the collector is not currently connected and sending data to the archiver. The bad data is not stored in the

IHA file but is only returned in the query. If the collector reconnects and flushes data and you run the query again, the actual stored data is returned in the following situations:

Collector loses connection to the archiver

Collector crashes

Collector compression is used and no value exceeds the deadband

79

Proficy Historian Getting Started Guide

ONLYRAW

LABSAMPLING

The ONLYRAW modifier retrieves only the raw stored samples. It does not add interpolated or lab sampled values at the beginning of each interval during calculated retrieval such as average or minimum or maximum.

Normally, a data query for minimum value will interpolate a value at the start of each interval and use that together with any raw samples to determine the minimum value in the interval. Interpolation is necessary because some intervals may not have any raw samples stored.

Use this query modifier with calculation modes only, not with raw or sampled retrieval like interpolated modes.

The LABSAMPLING modifier affects the calculation modes that interpolate a value at the start of each interval. Instead of using interpolation, lab sampling is used. When querying highly compressed data you may have intervals with no raw samples stored.

An average from 2 P.M to 6 P.M on a one hour interval will interpolate a value at 2

P.M., 3 P.M., 4 P.M, and 5 P.M and use those in addition to any stored samples to compute averages. When you specify

LABSAMPLING, then lab sampling mode is used instead of interpolated sampling mode to determine the 2 P.M., 3 P.M., 4 P.M., and

5 P.M., values.

A lab sampled average would be used when querying a tag that never ramps but changes in a step pattern such as a state value or setpoint.

Use this query modifier with calculation modes only, not raw or sampled retrieval like interpolated modes.

80

Getting Started with Historian

INCLUDEBAD retrieves the native, numeric values such as 1 or 2 instead of string values such as on/off for the data that has enumerated states associated with it.

You can use ENUMNATIVEVALUE with any sampling or calculation mode.

Normally, when you query calculated data from Proficy Historian, only good data quality raw samples are considered.

INCLUDEBAD modifier includes bad data quality values in calculations.

You can use INCLUDEBAD with any sampling or calculation mode. data quality values. When we use

FILTERINCLUDEBAD, the bad data quality values are considered when filtering to determine time ranges.

This query modifier is not always recommended. modifier is used only for the MultiField tags.

It returns the value of all the fields at the same timestamp of the master field time, in each interval returned.

Filtered Data Queries

Filtered data queries enhance Historian by adding filter tags and additional filtering criteria to standard queries.

Unfiltered data queries in Historian allow you to specify a start and end time for the query, then return all data samples within that interval. A filtered data query, however, will allow you to specify a condition to filter the results by, as well as calculation modes to perform on the returned data. Filtered data queries are performed on the Historian server.

81

Proficy Historian Getting Started Guide

For example, a filtered data query is useful when trying to retrieve all data for a specific Batch ID, Lot Number, or Product Code and for filtering data where certain limits were exceeded, such as all data where a temperature exceeded a certain value. Rather than filtering a full day's worth of process data in the client application, you can filter data in the Historian archiver, and only return the matching results to the client application. The result is a smaller, more relevant data set.6.00975/5.

You can use filter criteria with raw, interpolated, and calculated sampling modes. You cannot use it with current value sampling. The logic of selecting intervals is always interpolated, even when the data retrieval is raw or calculated. The value that triggers a transition from false to true can be a raw value or interpolated value.

You cannot use a filtered data query in an iFIX chart. For more information, refer to Advanced Topics section in the online help.

Overview of Filtered Data Query Parameters

Use of filter parameters with a data query is optional. The following table describes each of the filtering parameters you can use.

Filter Parameters for Data Queries

Parameter Description

Filter Tag The single tag name used when applying the filter criteria.

NOTE: You can enter your filter conditions using Filter tag, Filter Comparison Mode, and Filter Comparison Value or you can put that all that information in a single

FilterExpression.

82

Getting Started with Historian

Filter

Expression

An expression which includes one or more filter conditions. The type of conditions used are:

Filter Mode

• Combination of both AND and OR

Filter Expression can be used instead of FilterTag, FilterComparisonMode and

FilterValue parameters. While using FilterExpression, the expression is passed within single quotes and for complex expressions we write the conditions within a parenthesis.

There is no maximum length for a filter expression, but if it is called using OLEDB or

Excel, they may have their own limitations.

The type of time filter:

ExactTime – Retrieves data for the exact times that the filter condition is True (only True).

BeforeTime – Retrieves data from the time of the last False filter condition up until the time of the True condition (False until True).

AfterTime – Retrieves data from the time of the True filter condition up until the time of next False condition (True until False).

BeforeAndAfterTime – Retrieves data from the time of the last False filter condition up until the time of next False condition (While True).

The Filter Mode defines how time periods before and after transitions in the filter condition should be handled.

For example, AfterTime indicates that the filter condition should be True starting at the timestamp of the archive value that triggered the True condition and leading up to the timestamp of the archive value that triggered the False condition.

83

Proficy Historian Getting Started Guide

84

Filter

Comparison

Mode

NOTE: Filter Comparison Mode is only used if Filter Tag is filled in.

The type of comparison to be made on the filter comparison value:

Equal – Filter condition is True when the Filter Tag is equal to the comparison value.

EqualFirst – Filter condition is True when the Filter Tag is equal to the first comparison value.

EqualLast – Filter condition is True when the Filter Tag is equal to the last comparison value.

NotEqual – Filter condition is True when the Filter Tag is NOT equal to the comparison value.

LessThan – Filter condition is True when the Filter Tag is less than the comparison value.

GreaterThan – Filter condition is True when the Filter Tag is greater than the comparison value.

LessThanEqual – Filter condition is True when the Filter Tag is less than or equal to the comparison value.

GreaterThanEqual – Filter condition is True when the Filter Tag is greater than or equal to the comparison value.

AllBitSet - Filter condition is True when the binary value of the Filter

Tag is equal to all the bits in the condition. It is represented as ^ to be used in Filter Expression.

AnyBitSet - Filter condition is True when the binary value of the Filter

Tag is equal to any of the bits in the condition. It is represented as ~ to be used in Filter Expression.

AnyBitNotSet - Filter condition is True when the binary value of the

Filter Tag is not equal to any one of the bits in the condition. It is represented as !~ to be used in Filter Expression.

AllBitNotSet - Filter condition is True when the binary value of the

Filter Tag is not equal to all the bits in the condition. It is represented as !^ to be used in Filter Expression.

Alarm Condition – Specifies an alarm condition to filter data by. For example, Level.

Alarm SubCondition – Specifies an alarm sub-condition to filter data by. For example, HIHI.

The Filter Comparison Mode defines how archive values for the Filter Tag should be compared to the Filter Value to establish the state of the filter condition. If a Filter Tag and Filter Comparison Value are supplied, time periods are filtered from the results where the filter condition is False.

Getting Started with Historian

Filter

Comparison

Value

NOTE: Filter Comparison Value is only used if Filter Tag is filled in.

The value to compare the filter tag with when applying the appropriate filter to the data record set query (to determine the appropriate filter times).

Example: Filtered Queries in the Excel Add-In

The following example shows how a filtered data query will return specific data from the Historian archive.

This example makes use of two tags, batchid and ramp. The batchid tag is updated before a new batch is produced with the new batch's ID. The ramp tag contains raw data sent by a device in the process. In this example, we'd like Historian to return data samples at ten second intervals for the ramp tag during the period that the batchid tag is set to B1.

A standard query in Historian for the ramp tag's values between 08:00 and 08:01, at ten second intervals, would look like this:

Time Stamp

07/30/2003 08:00:10

07/30/2003 08:00:20

07/30/2003 08:00:30

07/30/2003 08:00:40

07/30/2003 08:00:50

Value

16

22

34

46

Data Quality

Good

Good

Good

Good

Good

50

07/30/2003 08:01:00 Good

55

If we did a query against the batchid tag for the same time interval, we would receive the following results:

85

Proficy Historian Getting Started Guide

Time Stamp

07/30/2003 08:00:00

07/30/2003 08:00:20

07/30/2003 08:00:45

Value

B0

B1

B2

Data Quality

Good

Good

Good

To filter data queries in the Excel Add-in:

In order to find the values of the ramp tag for the B1 batch, you would enter the following values into the

Historian Filtered Data Query dialog box:

1. In the Tag Name(s) field, enter the tag you want to receive results from - the ramp tag in this example.

2. Select a start and end time for your query.

3. In the Filter Tag field, enter the tag you want to enable filtering with - batchid in this example.

4. In the Filter Comparison field, select your comparison condition.

5. In the Include Data Where Value Is field, enter your filter condition value.

6. In the Include Times field, select your filter mode.

7. In the Sampling Type field, select your sampling mode.

8. In the Calculation field, select your calculation mode.

9. Select your Sampling Interval.

10. In the Output Display field, select which tag values you wish to display.

NOTE: You can enter your filter conditions using Filter tag, Filter Comparison Mode, and Filter Comparison

Value or you can put that all that information in a single FilterExpression. You can enter the filter conditions in the FilterExpression field of the Historian Data Query dialog box. The filter conditions are passed within single quotes.

86

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement

Table of contents