Working with the Historian Excel Add-In

Important: You do not have the latest version of Historian! You are missing out on the newest capabilities and enhanced security. For information on all the latest features, see the Historian product page. For more information on upgrades, contact your GE Digital sales agent or e-mail GE Digital Sales Support. For the most up-to-date documentation, go here.

Configuring the Excel Add-In Options

To select options for running the Excel Add-In, select Options from the Historian 7.1 menu.
The Historian Excel Add-In dialog box appears.

Excel Add-In Options

Field Description
Internal vs. External References Choosing Use External References allows your application to reference cells in other worksheets and workbooks in addition to the current one. If you choose Use Internal References instead, you can only access cells in the current worksheet. The default setting is Use External References.
Automatically Update Links to Add- In (Yes/No) Add-In functions are maintained as worksheet links. If users who share worksheets do not have Microsoft Office installed the same way, it is necessary to turn this feature on. When on, this feature automatically re-establishes any formula links that may be broken due to differences among users in Microsoft Office installation. The default setting enables this feature.

The Auto Update feature allows sharing of worksheets. You must, however, install the Excel Add-In in the exact same Microsoft Office Library Path as the other worksheets if you want to use the sharing feature.

When opening a worksheet with links to another worksheet, you may receive a message prompting you to update all linked information in the workbook (Yes) or keep the existing information (No). It is recommended that you select No and keep the existing information. The links will be automatically updated for your worksheet. Save your worksheet after the links have been updated.

Show/Hide Header Labels This option lets you display or suppress the column header labels that are automatically placed in the worksheet when entering formulas throughout the Historian dialogs. The default setting is Show Labels.
Color Allows you to select the header name color from the drop-down list: black, blue, red, green, magenta, cyan, or yellow.
Assign Default Server This dialog box shows the current server assignment. You can modify the setting by clicking the Edit button and accessing the Historian Server Managers dialog box. This dialog box allows you to save user connection information, add or connect to a new server, delete a server, and modify the default server.
Adjust Column Widths This option lets you automatically adjust the width of columns in your worksheet as formulas are inserted by Historian dialogs. Click Adjust Header Column Width to modify the width of header labels; click Adjust Data Column Width to modify the data column widths to accommodate the data values. Enabling these options usually makes the worksheet much more readable. However, doing so can sometimes make the worksheet calculate too much when building a large report. In such cases, disable the automatic feature and adjust individual columns manually.
Save/Default/Cancel These action buttons let you apply your choices of options. Click Save to apply the settings you entered, click Default to select default settings for all options, and click Cancel to close the dialog box.

Searching Tags

The Search Tags command lets you scan the tags on a specified server and then to perform actions on one or more tags you select from that group. When you select the Search Tags command in the Historian menu, the Historian Tag Search dialog box appears.

See also Searching a Tag Using Advance Search Criteria.

  1. Select Search Tags from the Historian 7.1 menu.
    The Historian Tag Search dialog box appears
  2. In the Server field, select a server from the drop-down list. If you do not specify a server, the Add-In searches the default server.
    To add or connect to a new server click the Browse button. To set the selected server as default, ensure the Set Server to Default option is enabled.
  3. Enter the Tag Mask or type *.
    Note:

    To use the Advance Tag Search option, click the Search button without specifying the Tag Mask.

  4. Click the Search button.
    The Historian Tag Search dialog box is populated with a tag list.
  5. Select Tags from the Search List:
    • Click a specific tagname to select it in the populated Historian Search Tags dialog box. To select multiple individual tags, press the Control key and click the tagnames. To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
    • When you have selected the tags you want, click the right arrow (>) button in the center of the screen. This moves the selected tags to the right hand window. The selected tags are the tags for which the query obtains and displays data. If you click the double right (>>) arrow instead of the single right arrow, you select and move all tags to the right hand window.
    • If you change your mind about a tag, you can deselect it by clicking on the tagname to highlight it and then clicking the left arrow (<) button. This moves the tag back to the left hand window, removing it from the list of selected tags. Similarly, you can deselect all tags, by clicking the double left (<<) arrow.
  6. Use the Search Display section to choose whether you want to display tagnames or tag description. It also displays the number of tags returned.
  7. Use the Output With to choose whether the output presentation shows the names of the selected tags or the cell computation formulas.
    Using Output with Formula places a dynamic formula in the worksheet, versus just a copy of the tag names currently selected. Having a dynamic formula allows the list of tags returned to be dynamic based on the tag mask criteria supplied. This is particularly useful when selecting a cell reference for the tag mask as opposed to typing in a tag mask directly in the dialog.

    When you use the Advance Tag Search dialog to search tags, you cannot choose Output with Formula.

  8. Use the Output Range field to determine where in the worksheet the output data displays.
    Click in the Output Range field and select a range of cells in a single row or column in the worksheet. In most cases, you should choose Columns for a typical report. Selecting the Rows option rotates the report presentation 90 degrees.
  9. Use the Output Display section to select the type of data to be displayed.
    Select a name to choose a single parameter for display. To select multiple individual parameters, press the Control key and click the parameters. To select a sequence of parameters, press the Shift key and click the first and last parameter of the sequence.
  10. When you have selected all desired options, click OK to apply your choices and initiate the query. Click Cancel to close the dialog box.

Searching a Tag Using Advance Search Criteria

The Advanced Tag Search dialog allows you to search the set of tags that match the search criteria and then to perform actions based on one or more tags that you select from the list. It saves the most recently used search criteria to a file named DefaultSearchCriteria.xml in the Excel AppData path (c:\user- s\<username>\AppData) and this criteria is automatically loaded into the dialog the next time it is opened. This feature allows you to re-use or modify the criteria rather than entering them each time. If you want to reset your criteria, delete the XML file.

Using this search dialog, you can:
  • Add multiple search criteria based on the tag criteria and the criteria value.
  • Modify the existing criteria value.
  • Delete the unwanted search criteria from the list.
  • Save any list of criteria to a file.
  • Load a saved criteria list for searches.
  • Automatically load the most recently used criteria for re-use.
  • Search the Historian database based on the search criteria.
  • View the details of a tag.
  1. From the Proficy Historian Advanced Tag Search dialog box, select the Tag Criteria from the list.
  2. Enter or select the Tag Criteria Value.
  3. Click the Add Criteria button.
    The criteria is listed in the Search Criteria list section.
  4. Click the Search button.
    All tags that satisfy the query criteria are displayed in the Available section.
  5. Select Tags from the Avaliable List:
    • Click a specific tag name to select it from the list. To select multiple individual tags, press the Control key and click the tag names. To select a sequence of tags, press the Shift key and click the first and last tag name of the sequence.
    • When you have selected the tags you want, click the right arrow (>) button. This moves the selected tags to the right hand window. The selected tags are the tags for which the query obtains and displays data. If you click the double right arrow(>>) instead of the single right arrow, you select and move all tags to the right hand window.
    • If you change your mind about a tag, you can deselect it by clicking on the tag name to highlight it and then clicking theleft arrow (<) button. This moves the tag back to the left hand window, removing it from the list of selected tags. Similarly, you can deselect all tags, by clicking the double left arrow (<<).
  6. To modify the Tag Criteria Value already entered:
    1. Double-click the criteria from the list.
    2. Change the Tag Criteria Value.
    3. Click the Update Criteria button. The criteria value is updated with the new value.
  7. To delete the search criteria from the list:
    1. Select the criteria from the list and click the Delete button.
    2. Click the Select All button and then click Delete, to delete the entire criteria list.
    3. Click the UnSelect All button, to remove the selection.
  8. To save a search Criteria List to be reused:
    1. Create your search criteria list.
    2. Click on the Save button.

      The Save As dialog box appears.

    3. Enter the file name and click Save.

      Your Criteria list is saved as a .xml file.

  9. To load an existing Criteria List:
    1. Click on the Load button. The Open dialog box appears.
    2. Choose the file (.xml) you saved earlier and click Open.

      The criteria list is loaded to the Advanced Tag Search window and it can be used for searching.

  10. To view the tag attributes, double-click the tag from the available section or from the selected section.
    The Tag Attributes dialog box appears with the attribute details.
  11. Click OK to return the list of tags on the parent dialog box.
  12. Click Cancel to close the dialog box.

Relative Time Entries

When entering the Start and End times for Excel Add-in queries and exports, you can already enter them as exact literal dates and times such as 1/28/14 09:00:00 in the query dialogs like Query Calculated Data, or you can use a cell reference to an exact time, or use an Excel function such as =Now() or =Today(). Apart from the mentioned ways, you can use relative time entries using a base value and an offset value as described in the following tables.

For example, you can use Yesterday+8H for 8am yesterday or Now-15m for 15 minutes before the current time. The typical use of a relative time entry, is to type the time values using a base and an offset into the start and end time of the Query dialogs or Export dialog, instead of having to put =Now() or =Today() in a cell and making a cell reference to that, or use the base Monday to produce weekly reports.

Base Values

Base Value Description
Now The current date and time.
Today The current date at midnight.
Yesterday The previous day at midnight.
Sunday Today or the most recent Sunday at midnight.
Monday Today or the most recent Monday at midnight.
Tuesday Today or the most recent Tuesday at midnight.
Wednesday Today or the most recent Wednesday at midnight.
Thursday Today or the most recent Thursday at midnight.
Friday Today or the most recent Friday at midnight.
Saturday Today or the most recent Saturday at midnight.

Offset Values

Offset Value Description
d

One 24 hour day

h

One hour

m

One minute

s

One second

About Querying Alarm and Event Data

For more information on working with alarm and event data in the Excel Add-In, refer to Historian Alarms and Events.

Querying Current Values

Querying current values retrieves the most recently updated value of one or more Tags or process variables.
Note: If you attempt to perform a Query Current Value with two worksheets open, the Excel Add-In may become unstable and lock up. This is a known Microsoft Excel issue. To avoid locking up Excel while performing queries with the Excel Add-In, work with only one Excel document at a time.
  1. Select Query Raw Data from the Historian 7.1 menu.
    The Historian Raw Data Query dialog box appears.
  2. Select a server from the drop-down list. If you do not specify a server, the Add-In queries the default server.
    To set the selected server as default, ensure the Set Server to Default option is enabled.
  3. Select a tag on your worksheet and, while it is selected, click in the Tag Name field of the dialog box.
    This enters the tagname for you automatically. You can also enter the tag names manually in the Tag Name field of the dialog box.
    Optionally, you can select the tag from the Advance Tag Search dialog. For more information, refer to Advance Tag Search topic.
  4. In the Query Type section, select the type of data search from three options:
    • By Time Selecting the By Time option means that you search for data values between a start time and an end time. You must enter values for starting and ending times in the fields displayed at the right of the option. You can also use relative time entries to this field. For more information, refer to Relative Time Entries topic.
    • By Number Forward Selecting the By Number Forward means searching for a number of values after a specified time. Enter values into the After Time and Number of Values fields.
    • By Number Backward Selecting the By Number Backward means searching for a number of values before a specified time. The display changes from start and end times to Values Before Time and Number of Values. Enter appropriate parameters in these fields.
  5. In the Query Criteria String, enter the query criteria along with the # symbol.
    For example, if the query criteria string is to retrieve only good data quality values, then you should specify #ONLYGOOD as the Query Criteria String. For more information, see Query Modifiers.
  6. In the Output Display field, select one or more parameters for the output.
    To select multiple individual tags, press the Control key and click the tagnames.
    To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
  7. Click in the Output Range field and select a range of cells in a single row or column to determine where the returned data is placed.
  8. Select either Columns or Rows for the output display.
    Selecting Columns displays a table of values with parameters arranged in columns with header labels at the top.
    Selecting Rows rotates the table 90 degrees.
  9. Select either Ascending or Descending to set the order of the retrieved data in either ascending or descending order.
  10. Click OK to initiate the query. Click Cancel to abort the operation and close the dialog.
    Note: For an Array Tag, each element is displayed in separate rows with the tag name and index.

Querying Raw Data

Raw data values are the values actually stored in the archive, after applying collector and archive compression, but before applying any interpolation, smoothing, or other signal processing calculations. Querying raw data retrieves these values for a selected tag.

The raw data query returns a number of data points based on the number of rows or columns specified in the output range. If you are not viewing all your data points, select enough rows or columns to display all the data.

  1. Select Query Raw Data from the Historian 7.1 menu.
    The Historian Raw Data Query dialog box appears.
  2. Select a server from the drop-down list. If you do not specify a server, the Add-In queries the default server.
    To set the selected server as default, ensure the Set Server to Default option is enabled.
  3. Select a tag on your worksheet and, while it is selected, click in the Tag Name field of the dialog box.
    This enters the tag name for you automatically. You can also enter the tag names manually in the Tag Name field of the dialog box.
    Optionally, you can select the tag from the Advance Tag Search dialog. For more information, refer to Advance Tag Search topic.
  4. In the Query Type section, select the type of data search from three options:
    • By Time Search for data values between a start time and an end time. You must enter values for starting and ending times in the fields displayed at the right of the option. You can also use relative time entries to this field. For more information, refer to Relative Time Entries
    • By Number Forward Search for a number of values after a specified time. Enter values into the After Time and Number of Values fields.
    • By Number Backward Search for a number of values before a specified time. The display changes from start and end times to Values Before Time and Number of Values. Enter appropriate parameters in these fields.
  5. In the Query Criteria String, enter the query criteria along with the # symbol.
    For example, if the query criteria string is to retrieve only good data quality values, then you should specify #ONLYGOOD as the Query Criteria String. For more information, see Query Modifiers.
  6. In the Output Display field, select one or more parameters for the output.
    To select multiple individual tags, press the Control key and click the tag names.
    To select a sequence of tags, press the Shift key and click the first and last tag name of the sequence.
  7. Click in the Output Range field and select a range of cells in a single row or column to determine where the returned data is placed.
  8. Select either Columns or Rows for the output display.
    Selecting Columns displays a table of values with parameters arranged in columns with header labels at the top. Selecting Rows rotates the table 90 degrees.
  9. Select either Ascending or Descending to set the order of the retrieved data in either ascending or descending order.
  10. Click OK to initiate the query. Click Cancel to abort the operation and close the dialog.
    Note: For an Array Tag, each element is displayed in separate rows with the tag name and index.

Querying Filtered Data

The Query Filtered Data function is similar to the calculated data query, with the addition of a search filter on the data. The search filter allows you to filter the actual data retrieved with a filter condition. This function 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 this temperature exceeded a certain value.

When querying filtered data, you can use a Filter Expression instead of FilterTag, FilterMode, and FilterValue parameters. You can use multiple filter conditions in the filter expression. For more information and examples on filter expression, refer to Advanced Topics.

Note: Do not use the Desc option for the Output Range in the Filtered Data Query dialog box. Using this option may cause the Excel Add-In to become unstable. If you use this option and find that Excel is unstable, try minimizing the Excel application window, expose the Filtered Data Query dialog box, and close the dialog box. Excel should then function normally.
  1. Select Query Filtered Data from the Historian 7.1 menu.
    The Historian Filtered Data Query dialog box appears.
  2. Select a server from the drop-down list. If you do not specify a server, the Add-In automatically uses the default server.
    To set the selected server as default, ensure the Set Server to Default option is enabled.
  3. Select a tag on your worksheet and, while they are selected, click in the Tag Name field of the dialog box.
    This enters the tag names for you automatically. You can also enter the tag names manually in the Tag Name field of the dialog box.
    Note: While entering multiple tag names manually, separate each tag name with a colon. If your tag name has a colon within it, then you should select the tag names via cell references only.

    Do not use wildcards in this field. If you use a tag mask instead of a tagname, Historian 7.1 only returns the first possible match.

    Optionally, you can select the tags from the Advance Tag Search dialog. For more information, refer to Searching a Tag Using Advance Search Criteria..

  4. In the Query Time section enter values of time in the Start Time and End Time fields.
    You can also use relative time entries to this field.
  5. In the Query Criteria String, enter the query criteria along with the # symbol.
    For example, if the query criteria string is to retrieve only good data quality values, then you should specify #ONLYGOOD as the Query Criteria String. For more information, refer to the Query Modifiers topic.
  6. In the Sampling Type section, select a type from the drop-down list. For a list of available sample types, refer to the Sampling Types topic.
  7. The Calculation Field is active only after you select Calculated Sampling as the Sample Type. You can select a Calculation Algorithm type from the drop-down list.
  8. In the Sampling Interval section, select either the By Interval or By Samples option.
    • The By Interval option displays two entry fields, Interval and Time Unit. Enter values in both. For example, to sample at 10 minute intervals, enter 10 in the interval field and select Minutes in the Time Unit field.
    • The By Samples option displays a Number of Samples field. To specify a number of samples for the data query, enter a number in this field. For example, to query 100 samples, enter 100 in this field.
  9. Enter the state value. The State Value is active only after you select Sampling Type as Calculated and Calculation Field as State Count or State Time.
  10. In the Output Display field, select one or more parameters for the output.
    Click a name to select it. To select multiple individual tags, press the Control key and click the tagnames. To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
  11. In the Filter Definition section, enter filter parameters in the fields for Filter Tag, Filter Expression, Filter Comparison, Include Date Where Value Is Equal To, and Include Times.
    These fields are optional. If you do not enter any values, the query returns all values without filtering. See the Filter Parameters for Data Queries section for more information.
  12. Click in the Output Range field and select a range of cells in a single row or column to determine where the returned data is placed.
  13. Select either Columns or Rows for the output display.
    Selecting Columns displays a table of values with parameters arranged in columns with header labels at the top. Selecting Rows rotates the table 90 degrees.
    Note: When selecting multiple tags, the orientation of the return data is based on the orientation of the selected tags and the Row/Col selection is ignored.
  14. Select either Ascending or Descending to set the order of the retrieved data in either ascending or descending order.
  15. Click OK to initiate the query. Click Cancel to abort the operation and close the dialog.
    Note: For an Array Tag, each element is displayed in separate rows with the tag name and index.

    TagStats Calculation mode is not supported.

Filter Parameters for Data Queries

Parameters 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 Filter Expression.
Filter Expression An expression which includes one or more filter conditions. The type of conditions used are:
  • AND Condition
  • OR Condition
  • Combination of both AND and OR

FilterExpression can be used instead of FilterTag, FilterComparisonMode and FilterValue parameters. There is no maximum length for a filter expression.

Filter Mode 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.

Filter Comparison Mode 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.
  • AllBitsSet 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.
  • AllBitsNotSet 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.
Note: Filter Comparison Mode is only used if Filter Tag is filled in.
FilterComparison Value 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).
Note: Filter Comparison Value is only used if Filter Tag is filled in.

Batch IDs

If you had a BatchID going into a Historian tag, that BatchID will either have a timestamp at the beginning of the batch or at the end of the batch. Different batch systems report the BatchID as the batch is started, and other systems do not report the BatchID until the batch is finished.

If your BatchID is reported at the beginning of a batch, you would need to use the AfterTime option because you would want to include all data for a particular BatchID after the time the BatchID was reported up until the next BatchID was reported. If your BatchID was being reported at the end of the batch, you would want to use the BeforeTime option because you would want to include all data for a particular Batch ID before the time the Batch ID was reported back to the previous BatchID being reported.

Querying Calculated Data

Querying Calculated Data retrieves data that is the result of performing specified calculations on raw data values in the archive.
Note: If you attempt to perform a calculated data query with two worksheets open, the Excel Add-In may become unstable and lock up. This is a known Microsoft Excel issue. To avoid locking up Excel while performing queries with the Excel Add-In, work with only one Excel document at a time.
  1. Select Query Calculated Data from the Historian 7.1 menu.
    The Historian Calculated Data Query dialog box appears.
  2. Select a server from the drop-down list. If you do not specify a server, the Add-In queries the default server.
    To set the selected server as default, ensure the Set Server to Default option is enabled
  3. Select a tag or group of tags on your worksheet or enter the tag names manually separating each name by a colon (:).
    Note: If your tag name has a colon within it, then you should select the tag names via cell references only.
    Optionally, you can select the tags from the Advance Tag Search dialog. For more information, refer to Searching a Tag Using Advance Search Criteria topic.
  4. In the Query Time section, enter values of time in the Start Time and End Time fields.
    You can also use relative time entries to this field. For more information, refer to Relative Time Entries.
  5. In the Query Criteria String, enter the query criteria along with the # symbol.
    For example, if the query criteria string is to retrieve only good data quality values, then you should specify #ONLYGOOD as the Query Criteria String. See Query Modifiers.
  6. In the Sampling Type section, select a type from the drop-down list.
    See Sample Types.

    The Calculation field is active only aver you select Sampling Type.

  7. Select a Calculation Algorithm type from the drop-down list.
  8. Enter the state value.
    The State Value is active only after you select Sampling Type as Calculated and Calculation Field as State Count or State Time.
  9. In the Sampling Interval section, select either the By Interval or By Samples option.
    • The By Interval option displays two entry fields, Interval and Time Unit. Enter values in both. For example, to sample at 10 minute intervals, enter 10 in the interval field and select Minutes in the Time Unit field.
    • The By Samples option displays a Number of Samples field. To specify a number of samples for the data query, enter a number in this field. For example, to query 100 samples, enter 100 in this field.
  10. In the Output Display field, select one or more parameters for the output.
    Click a name to select it. To select multiple individual tags, press the Control key and click the tagnames. To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
  11. Click in the Output Range field and select a range of cells in a single row or column to determine where the returned data is placed.
  12. Select either Columns or Rows for the output display.
    Selecting Columns displays a table of values with parameters arranged in columns with header labels at the top. Selecting Rows rotates the table 90 degrees.
    Note: When selecting multiple tags, the orientation of the return data is based on the orientation of the selected tags and the Row/Col selection is ignored.
  13. Select either Ascending or Descending to set the order of the retrieved data in either ascending or descending time order.
  14. Click OK to initiate the query. Click Cancel to abort the operation and close the dialog.
    Note: For an Array Tag, each element is displayed in separate rows with the tag name and index.

    TagStats Calculation mode is not supported.

Sampling Types

Interpolated Sampling
Calculates values between two data points using a linear inter- polation algorithm.
Calculated Sampling
Computes values using an algorithm selected in the Calculation field.
Lab Sampling
Computes intermediate values between two data points by using the last actual value. This type of sampling displays as a stair step type of curve.
Trend Sampling
Returns the raw minimum and raw maximum value for each specified interval. Use the Trend sampling mode to maximize performance when retrieving data points for plotting. For the Trend sampling mode, if the sampling period does not evenly divide by the interval length, Historian 7.1 ignores any leftover values at the end, rather than putting them into a smaller interval.
InterpolatedtoRaw Sampling
Provides raw data in place of interpolated data when the number of samples fall lesser than the available samples.
TrendtoRaw Sampling
The TrendtoRaw sampling mode almost always produces the same results as the Trend sampling mode. The exception is that, when more samples are requested than there are raw data points, the TrendtoRaw sampling mode returns all of the available raw data points with no further processing. TrendtoRaw is therefore used rather than Trend when the number of actual data samples are fewer than the requested number of samples.
LabtoRaw Sampling
Provides raw data for the selected calculated data over the plot, when the number of samples fall lesser than the available samples.
RawByFilterToggle Sampling
Returns filtered time ranges with values 0 and 1. If the value is 1, then the filter 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.
Trend2 Sampling
Returns the raw minimum and raw maximum value for each specified interval. Use the Trend2 sampling mode to maximize performance when retrieving data points for plotting. Also, if the sampling period does not evenly divide by the interval length, Historian creates as many intervals of the interval length as will fit into the sampling period, and then creates a remainder interval from whatever time is left. Trend2 sampling mode is more suitable than Trend sampling mode for analysis of mins and maxes and for plotting programs that can handle unevenly spaced data.
TrendtoRaw2 Sampling
The TrendtoRaw2 sampling mode almost always produces the same results as the Trend2 sampling mode. The exception is that, when more samples are requested than there are raw data points, the TrendtoRaw2 sampling mode returns all of the available raw data points with no further processing. TrendtoRaw2 is therefore used rather than Trend2 when the number of actual data samples are fewer than the requested number of samples.

Calculation Algorithm Types

Average
A time weighted arithmetic mean.
Minimum
The lowest value in the group.
Maximum
The highest value in the group.
Standard Deviation
The square root of the arithmetic mean of deviations from the time- weighted arithmetic mean of all values in the group.
Total
The time-weighted total of all values in the group. Note that Engineering Units are assumed to be in Units/Day. If your Engineering Units were not measured in Units/Day, you must scale your total to the actual time units of the measurement. For example, if the measurement were in Units/Minute (such as GPM), you would multiply the total number by 1440 (minutes in a day) to scale the value into the correct time units.
Count
The total number of values in the group.
Raw Average
The unweighted arithmetic mean of all values in the group.
Raw Standard Deviation
The square root of the arithmetic mean of deviations from the unweighted arithmetic mean of all values in the group.
Raw Total
The unweighted total of all values in the group.
Time of Minimum Value
The time at which the minimum value occurred. l Time of Maximum Value - the time at which the maximum value occurred.
Time Good
The amount of time (in milliseconds) during the interval when the data quality is good.
State Count
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.
State Time
Displays the duration that a tag was in a given state within an interval.
First Raw Value
Returns the first good raw sample value in the given time interval.
First Raw Time
Returns the time stamp of the first good raw sample in the given time interval.
Last Raw Value
Returns the last good raw sample value in the given time interval.
Last Raw Time
Returns the time stamp of the last good raw sample in the given time interval.
TagStats
Returns the values of multiple calculation modes in a single query.

Editing a Query

The Edit Query feature allows you to change query parameters such as tag name, start time, end time, and so on, in Excel. The Edit Query dialog box that displays is based on the type of query you are editing. For example, if you want to edit a calculated query data then the Calculated Edit Query dialog box appears.

You can use the Edit Query feature to request more data than is currently displayed or you can select an output range that does not overlap the current range. However, you cannot make the output range smaller. For example, a query edit that changes the NumberOfSamples or the Output Orientation to values that result in fewer rows or columns will not work.

  1. Select the existing query in the Excel Sheet.
  2. From the Add-in drop-down list, select the Edit Query from the Add-In drop down list or click the icon or double click any cell which has the query formula.
    The Edit Query dialog box appears with the existing query data.
  3. Modify the query and click OK.

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.

When using query modifiers, specify #Query Modifier as the Query Criteria String. For example, if the query criteria string is to retrieve only good data quality values, then you should specify #ONLYGOOD as the Query Criteria String.

Query Modifier Results
ONLYGOOD 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 Current Value queries.

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

INCLUDEREPLACED Normally,when you query raw data from 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 the other 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.

INCLUDEDELETED 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.

ONLYIFCONNECTED/ONLYIFUPTODATE 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
ONLYRAW 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.

LABSAMPLING 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.

ENUMNATIVEVALUE The ENUMNATIVEVALUE modifier 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.

INCLUDEBAD Normally,when you query calculated data from 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.

FILTERINCLUDEBAD Typically while filtering we use only good 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.
USEMASTERFIELDTIME The USEMASTERFIELDTIME query 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.
HONORENDTIME Normally, a query keeps searching through archives until the desired number of samples has been located, or until it gets to the first or last archive.

However, there are cases where you would want to specify a time limit as well. For example, you may want to output the returned data for a RawByNumber query in a trend screen, in which case there is no need to return data that would be offscreen.

In cases where you want to specify a time limit, you can do this by specifying an end time in your RawByNumber query and including the HONORENDTIME query modifier. Since RawByNumber has direction (backwards or forwards), the end time must be older than the start time for a backwards direction or newer than the start time for a forwards direction. Use this query modifier only with the RawByNumber sampling mode.

EXAMINEFEW Queries using calculation modes normally loop through every raw sample, between the given start time and end time, to compute the calculated values.

When using FirstRawValue, FirstRawTime, LastRawValue, and LastRawTime calculation modes, we can use only the raw sample near each interval boundary and achieve the same result. The EXAMINEFEW query modifier enables this. If you are using one of these calculation modes you may experience better read performance using the EXAMINEFEW query modifier.

Using this query modifier is recommended when:
  • The time interval is great than 1 minute.
  • The collection interval is greater than 1 second.
  • The data node size is greater than the default 1400 bytes.
  • The data type of the tags is String or Blob. Query performance varies depending on all of the above factors.

Use this query modifier only with FirstRawValue, FirstRawTime, LastRawValue, and LastRawTime calculation modes.

Exporting Tags

The Export Tags function permits you to send tag information from the Historian Server to an Excel worksheet or to another system, which may be either local or remote.

Note:
  • Before importing or exporting tags, data, or messages, you should be aware of a convention used with the Historian application. The Server is the reference point for all import and export functions, as illustrated in the following figure. If you want to move tag information from the Server into your worksheet, you must use the Export Tags command. Conversely, if you want to move data from your worksheet to the server, you must use the Import Data command.
  • You cannot enter more than 32,767 characters in a single cell in an Excel worksheet.

It is recommended that you first export a tag and then import it, to become familiar with the procedure and what the data looks like.



  1. Select Administration and then select Export Tags from the Historian 7.1 menu.
    The Export Tags from Historian 7.1 dialog box appears.
  2. Select a server from the drop-down list.
    If you do not select a server, the Add-In uses the default server.
  3. In the Filter Criteria section, enter the name of the tag you want to export or, as an alternative, enter a mask for selecting a group of tags.
    If you do not enter a tagname, the filter uses other criteria for selecting tags. If you do not enter any criteria, the filter returns all tags.
    If you prefer, you can enter a tag description and/or a description mask instead of a tagname or tag mask.
    Note: You cannot export multiple tags when tagnames are read from multiple cells. If you specify a range of tagnames to read from multiple cells in the Tag Mask or Tag Name(s) fields, only the first tag in the range will be exported.
    Note: The selection of tags should always be via cell references. Try not to type them directly into the dialog box. Rather, select them in the worksheet.
  4. Enter a collector name in the Collector field. This entry is optional.
  5. Select a data type from the drop-down list in the Data Type field.
    If you do not select a data type, or if you select a data type that does not match the other entries you have made, the filter uses other criteria.
  6. Select one or more field names from the list in the right hand window.
    To select a single item, click the name of the field. To select multiple individual tags, press the Control key and click the tag-names. To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
    Note: Always include Tagnames in the list of fields to export.
  7. In the Export Options section, select either the To New Worksheet, To CSV File, or To XML option.
    If you select either the CSV or XML option, you must also enter a path and file name for the destination file.
  8. Click OK to execute the Export Tag function.
    Click Cancel to cancel and close the dialog box.

    When the export function finishes, a dialog box appears within a display of the worksheet containing the exported tags. Click OK to acknowledge the operation and close the dialog box.

Renaming Tags

Historian allows you to rename/alias or permanently rename tags.
Note: Before importing or exporting tags, data, or messages, you should be aware of a convention used with the Historian application. The Server is the reference point for all import and export functions, as illustrated in the following figure. If you want to move tag information from the Server into your worksheet, you must use the Export Tags command. Conversely, if you want to move data from your worksheet to the server, you must use the Import Data command.

It is recommended that you first export a tag, rename the tag, and then import it, to become familiar with the procedure and what the data looks like.



Rename (Alias) Tags

You can rename tags through the Non-Web Historian Administrator, Excel Add-in, ihuAPI, and SDK. New tag names are called active tags and old tag names are called as aliases. Tag renaming will only update or modify tag names without modifying or changing the tag properties.

If you want to modify a renamed tag property, be aware that of all the alias' tag properties will also be updated. Whenever you rename a tag name, then the active tag name (that is, the new tag name) will be visible in the Tags list on the Historian Administrator Tag Maintenance screen. You can rename tags multiple times, but only the latest active tag name will be visible in the Tags list.

  1. Export Tags that you want to rename from the Historian Server. For more information, refer to the Exporting Tags.
    Important: You must only include Tagname in the list of fields to export.
  2. Insert a column to the right of the Tagname column.
  3. Double-click the column heading, and then type New Tagname.
  4. Select a cell in the New Tagname column, and then type a new tag name.
    Important: You must specify a tag name in all the rows of the New Tagname column. Currently, If you do not want to rename any of those exported tags, then you must delete that row and rename the remaining tags.
  5. From the Historian Menu, select Administration and then select Rename Tags.
    The Historian Rename Tags dialog box appears.
  6. Click Yes. If successful, a dialog box appears confirming completion of the rename function.
  7. Click OK to close the dialog box.

Permanently Renaming Tags

Historian allows you to permanently rename tag names using Excel Add-in. You can permanently rename a tag if you no longer want to read and write a tag by its previous name. Permanent rename makes the previous tag name available for new usage.

  1. Export tags that you want to rename from the Historian Server.
    See Exporting Tags.
    Note: IMPORTANT: You must only include Tagname in the list of fields to export.
  2. Insert a column to the right of the Tagname column.
  3. Double-click the column heading, and then type New Tagname.
  4. Select a cell in the New Tagname column, and then type a new tag name.
    Note: You must specify a tag name in all the rows of the New Tagname column. Currently, If you do not want to rename any of those exported tags, then you must delete that row and rename the remaining tags.
  5. Insert another column to the right of the New Tagname column.
  6. Double-click the column heading, and then type Permanent Rename.
  7. Select a cell in the Permanent Rename column, and then type either TRUE or FALSE.
    TRUE means permanent rename and FALSE means rename/alias.
    Note: If you leave the cell blank then it is FALSE by default.

    You cannot enter any other values other than TRUE or FALSE. If you enter any other value, then an error message will be generated.

  8. From the Historian 7.1 menu, select Administration and then select Rename Tags.
    The Historian Rename Tags dialog box appears.
  9. Click Yes. If successful, a message box appears confirming completion of the rename function.
  10. Click OK to close the dialog box.
    Note: If any errors occur, a message box appears detailing the issues encountered during the rename. If any error occurred with any line of the rename, the whole import is aborted
    .

Importing Tags

The Import Tags function permits you to move tag information into the Historian Server from an Excel Worksheet or from another system, which may be either local or remote.

When used with the Excel Add-In, the Import Tags function moves selected information from your current worksheet into the specified Historian Server. There is no error checking when you import tags through the Excel Add-In.

For example, with the Excel Add-In you can successfully import unsolicited tags without a calculation dependency (trigger). The Historian Administrator prevents you from performing this import. As another example, the Excel Add-In allows you to import circular references, while the Historian Administrator does not.

  1. Select Administration and then select Import Tags from the Historian 7.1 menu.
    A message box appears.
  2. Click Yes to initiate the operation.
    If successful, a dialog box appears confirming completion of the import function.
  3. Click OK to close the dialog box.
    If errors on the import occur, a dialog box appears detailing the issues encountered during the import. If any error occurred with any line of the import, the whole import is aborted.
    Note: If you export all fields and attempt to import the read-only fields LastModified and LastModifiedUser, you may receive an Import failed, Error with Import Header message. Try exporting the tags again (not selecting the read-only fields) and importing.

Deleting Tags

You cannot use the Excel Add-In to delete tags from your Historian system. For more information on deleting tags, see the Using the Administrator > Delete Tags.

Exporting Enumerated Sets

The Export Enumerated Sets function enables you to display information about enumerated sets in an Excel worksheet. Using this function, you can export sets data from Historian, add and edit the enumerated setsinformation, and import it back into Historian.

This feature allows you to make changes in bulk and send them to Historian in a simple procedure without using the Histroian Administrator. Before importing or exporting enumerated sets, you should be aware of a convention used with the Historian application. The Server is the reference point for all import and export functions. If you want to move tag information from the Historian Server into your worksheet, you must use the Export Enumerated Sets command.

Conversely, if you want to move data from your worksheet to the server, you must use the Import Enumerated Sets command. If you plan to import set information, it is recommended that you first export a set, to become familiar with the format.

  1. Select Administration and then select Export Enumerated Sets from the Historian 7.1 menu.
    The Historian Export Tags dialog box appears.
  2. Select a server from the drop-down list. If you do not select a server, the Add-In uses the default server.
  3. In the Filter Criteria section, in the EnumeratedSet Mask/EnumeratedSet Name field, search for the sets set you want to export.
    You can use one of the following options that are available:
    • Either enter a * or do not enter any criteria. All the sets appear.
    • Enter a set name or name mask or description and a description mask (*) criteria. All the sets matching the criteria appear.
  4. In the Export Options section, select either the To New Worksheet, To CSV File, or To XML option.
    If you select either the CSV or XML option, you must also enter a path and file name for the destination file.
  5. Click OK to execute the Export Enumerated Set function. Click Cancel to cancel and close the dialog box.
    When the export function finishes, a dialog box appears within a display of the worksheet containing the exported sets and the message, Export Succeeded.
  6. Click OK to acknowledge the operation and close the dialog box.

Importing Enumerated Sets

The Import Enumerated Sets function enables you to create or modify enumerated sets in the Historian Server. You can also add and modify sets using the Historian Administrator. See Working with Enumerated Sets.
  1. Select Administration and then select Import Enumerated Sets... from the Historian 7.1 menu.
    A message box appears asking you to confirm whether to import the sets.
  2. Click Yes to initiate the operation.
    If successful, a dialog box appears with the message, Import Enumerated Sets Succeeded confirming completion of the import function.
    Click OK to close the dialog box. If errors on the import occur, a dialog box appears detailing the issues encountered during the import.

Renaming Enumerated Sets

The Rename Enumerated Sets function enables you to rename existing enumerated sets in an Excel worksheet. To become familiar with the procedure, it is recommended that you first export an Enumerated Set, rename the Enumerated Set, and then import it.

Note: The Historian Server is, by convention, the reference point for all import and export functions. To move enumerated sets information from the Server into your worksheet, use the Export Enumerated Sets command. Conversely, to move enumerated sets from your worksheet to the server, use the Import Enumerated Sets command. This is illustrated in the following figure.

You can rename enumerated sets through the Non-Web Historian Administrator, the Excel Add-in, ihAPICom, and the SDK. Renaming an enumerated set modifies only the name of the enumerated set without modifying the properties of the enumerated set.

Whenever you rename an enumerated set, the active enumerated set name (that is, the new name for the enumerated set) is visible in the Enumerated Sets list on the Historian Administrator's Enumerated Sets maintenance screen. You can rename enumerated sets multiple times, but only the latest active enumerated set name will be visible in the Enumerated Sets list.

  1. Export enumerated sets that you want to rename from the Historian Server.
  2. In the exported worksheet, remove all the fields except setname.
  3. Change setnameto enumeratedsetnamein the header.
  4. In the exported worksheet, insert a column to the right of the EnumeratedSetName column.
  5. Select each cell in the NewEnumeratedSetName column, and type a new name for the relevant enumerated set.
    Important: Specify an new enumerated set name for all rows in the NewEnumeratedSetName column. If you do not want to rename any of the exported enumerated sets, delete that row from the spreadsheet and rename the remaining enumerated sets.
  6. From the Historian Menu, select Administration > Rename Enumerated Sets.
    The Proficy Historian Rename Enumerated Sets dialog appears.
  7. Click Yes. If successful, a dialog appears confirming completion of the rename function.

Working with Enumerated Sets Using Excel Add-In

Before importing enumerated sets into Historian from an Excel Worksheet, you can perform the following actions:

To add sets:

  1. Enter details in the following columns in the excel worksheet.

    It is recommended to fill the columns in the following sequence: SetName, SetDescription, StateName, StateDescription, StateLowValue, StateHighValue, StateRawValueDataType, and NumberOfStatesInThisSet.

  2. Click the Import Enumerated Sets to import the sets.

To delete sets:

  1. Select the row that has the state you want to delete.
  2. Right-click the row and select Delete.

    Alternatively, you can also use the Delete key on your keyboard.

To modify the description of a set:

Click in the StateDescription cell and modify the description.

You cannot modify the name of the set. If you change the name of the set, it is considered a new set.

To add states:

  1. Select the set to which you want to add a set.
  2. Add the name of the set in the SetName column.

    The name should be same as the set you selected.

  3. Enter the details in the SetDescription, StateName, StateDescription, StateLowValue, StateHighValue, and StateRawValueDataType columns.
  4. Enter the total number of states in the NumberOfStatesInThisSet column.

    Ensure that this value is the same for the current state and existing states in the set. For example, if a state has two states already and you are adding a third state, the number of states for all the three states should be changed to three.

    A new state is added to the set.

To modify states:

  1. Select the state you wish to modify by clicking the row in the Excel worksheet.
  2. Modify the values by clicking in the respective columns.

    The state/states are modified.

To delete states:

  1. Select the row that has the state you wish to delete.
  2. Right-click the row and select Delete.

    Alternatively, you can also use the Delete key on your keyboard.

Exporting User Defined Types

The Export User Defined Types function enables you to display information about User Defined Types in an Microsoft Excel worksheet. Using this function, you can export the data from Historian 7.1, add and edit the exported information, and optionally import it back into Historian 7.1. The advantage of using this feature is the capability to make changes in bulk and send them to Historian 7.1 in a simple procedure without using the Administrator application.
Note: You need to have appropriate security permissions to import and export a user defined type. For more information, refer to Getting Started with Historian Guide > Implementing Historian Security for the definition of the various security levels and groups.
  1. Select Administration and then select Export User Defined Types from the Historian 7.1 menu.
    The Historian Export User Defined Types dialog box appears.
  2. Select a server from the drop-down list.
    If you do not select a server, the add-in uses the default server.
  3. In the Filter Criteria section, in the UserDefinedType Mask/UserDefinedType Name field, search for the sets set you want to export. You can use one of the following options that are available:
    • Enter a * or do not enter any criteria. All the types appear.
    • Enter a type name or name mask or description and a description mask (*) criteria. All the types matching the criteria appear.
  4. In the Export Options section, select either the To New Worksheet, To CSV File, or To XML option.
    If you select either the CSV or XML option, you must also enter a path and file name for the destination file.
  5. Click OK to execute the Export User Defined type function. Click Cancel to cancel and close the dialog box.
    When the export function finishes, a dialog box appears within a display of the worksheet containing the exported types and the message, Export Succeeded. Click OK to acknowledge the operation and close the dialog box.

Importing User Defined Types

The Import User Defined Types function enables you to create or modify User Defined Types in the Historian Server. You can also add and modify User Defined Types using the Historian Administrator.

  1. Select Administration and then select Import MultiField Source Addresses from the Historian 7.1 menu.
    A message box appears asking you to confirm whether to import the sets.
  2. Click Yes to initiate the operation.
    If successful, a message box appears with the message, Import MultiField Source Addresses Succeeded confirming completion of the import function. Click OK to close the dialog box

    If errors on the import occur, a message box appears detailing the issues encountered during the import.

Working with User Defined Types Using Excel Add-In

Before importing a User Defined Type set into Historian from an Excel Worksheet, you can perform the following actions:

To add User Defined Types:

  1. Enter details into the columns in the excel worksheet.
    Note: The columns are listed here according to the way they appear in the Excel worksheet. However, it is recommended to fill the columns in the following sequence: UserDefinedTypeName, User- DefinedTypeDescription, FieldName, FieldDescription, FieldDatatype, IsMasterField, NumberOfFields, StoredFieldQualities and AdminSecurityGroup.
  2. Click Import UserDefinedTypes to import the types.

To modify the description of a User Defined Type:

  1. Click in the User Defined Type Description cell and modify the description.
    Note: You cannot modify the name of the type. If you change the name of the type, it is considered as a new type.
  2. Click the Import User Defined Types to import the types.

To add fields:

  1. Select the UserDefinedType to which you wish to add a field.
  2. Add the name of the type in the UserDefinedTypeName column. The name should be same as the type selected by you.
  3. Enter the details in the UserDefinedTypeDescription, FieldName, FieldDescription, FieldDatatype, IsMasterField, NumberOfFields, StoredFieldQualities and AdminSecurityGroup columns.
  4. In the NumberOfFields column, enter the total number of fields. Ensure that this value is the same for the current field and existing fields in the user defined type.

    For example, if a UserDefinedType has two fields already and you are adding a third field, the number of fields for all the three fields should be changed to three. A new field is added to the UserDefinedType on import.

To modify fields:

  1. Select the field you wish to modify by clicking the row in the Excel worksheet.
  2. Modify the values by clicking in the respective columns. The field/fields are modified on import.

To delete fields:

  1. Select the row that has the field you wish to delete.
  2. Right-click the row and select Delete. Alternatively, you can also use the Delete key on your key- board.
  3. Click the Import UserDefinedTypes to update your changes.

Exporting MultiField Source Address

The Export MultiField Source Address function enables you to display information of the source address of the multifield tags in an Excel worksheet.

  1. Select Administration and then select Export MultiField Source Addresses from the Historian 7.1 menu.
    The Historian Export MultiField Source Addresses dialog box appears.
  2. Select a server from the drop-down list. If you do not select a server, the Add-In uses the default server.
  3. In the Filter Criteria section, in the MultiField Tag Mask/MultiField Tag Name field, search for the sets set you want to export.
    You can use one of the following options that are available:
    • Enter a * or do not enter any criteria. All the types appear.
    • Enter a type name or name mask or description and a description mask (*) criteria. All the types matching the criteria appear.
  4. In the Export Options section, select either the To New Worksheet, To CSV File, or To XML option.
    If you select either the CSV or XML option, you must also enter a path and file name for the destination file.
  5. Click OK to execute the Export UserDefinedtype function. Click Cancel to cancel and close the dialog box.
    When the export function finishes, a dialog box appears within a display of the worksheet containing the exported types and the message, Export Succeeded. Click OK to acknowledge the operation and close the dialog box.

Importing MultiField Source Address

The Import MultiField Source Address function enables you to import the source address of the individual fields in the Historian Server.

  1. Select Administration and then select Import MultiField Source Address... from the Historian 7.1 menu.
    A message box appears asking you to confirm whether to import the sets.
  2. Click Yes to initiate the operation.
    If successful, a dialog box appears with the message, Import MultiField Source Address Succeeded confirming completion of the import function. Click OK to close the dialog box.

    If errors on the import occur, a dialog box appears detailing the issues encountered during the import.

Working with Array Tags Using Excel Add-In

Historian allows you to store a set of values with a single timestamp and then read the elements back individually or as an array tag. In Historian, we can modify a tag to an array tag by specifying the NumberOfElements as -1. Where NumberOfElements indicates the tag is an array tag. If the NumberOfElements is -1, then the tag is an array tag.

Tags with zero NumberOfElements are not array tags. Since the size of the array is dynamic there is no single number of elements that can be returned. In Excel Add-in each element of the array tag is displayed in separate rows with tagname with index (Tag-name[]) and values. You can perform all operations that you use for a tag on an Array tag. You can export, import and query an array tag or an array element.

Note:
  • Array tags do not support Enumerated set.
  • TagStats Calculation Mode is not supported.

Adding New Tags or Modifying Tag Parameters

You can use the Excel Add-In to add tags to your Historian system or to modify parameters for existing tags. For example, you can generate and define new tags either automatically or manually in an Excel worksheet and then import them in bulk to the Historian system.

This can be a very convenient mechanism when you are working with large numbers of tags. If any conflicting names or parameters occur, the system displays a warning message to alert you to the problem. You can then eliminate the conflict and try again.

You can also modify tag parameters by editing them in the worksheet and then bulk importing them into Historian.

  1. Build a tag worksheet in Excel using macros or any other tools you are familiar with.
    Since Historian requires information about each tag that varies with the type of tag selected, verify that you have included all required information in the worksheet before attempting to import it into Historian. To determine what specific tag information is required, refer to the documentation provided with your SCADA application.
  2. Use the Import Tags command to bulk import this information into your Historian 7.1 application.
    Note: If any errors on the import occur, a dialog appears detailing the issues encountered during the import. If any error occurred with any line of the import, the whole import is aborted.

Exporting Data

The Export Data function allows you to move values from the Historian Server to your Excel worksheet or to another system in the same way you move tag information with Export Tags.
Note: Before importing or exporting tags, data, or messages, you should be aware of a convention used with the Historian application. The Server is the reference point for all import and export functions. If you want to move tag information from the Server into your worksheet, you must use the Export Tags command. Conversely, if you want to move data from your worksheet to the server, you must use the Import Data command.
  1. Select Administration > Export Raw Data from the Historian 7.1 menu.
    The Export Data from Historian 7.1 dialog box appears.
  2. If you want to specify a server, select a server from the drop down list. If you do not specify a server, the Add-In uses the default server.
  3. Select a tag on your worksheet or enter the tag names manually.
    Note: If your tag name has a colon within it, then you should select the tag names via cell references only.
  4. Optionally, you can select the tags from the Advance Tag Search dialog.
  5. In the Query Criteria String, enter the query criteria along with the # symbol.
    For example, if the query criteria string is to retrieve only good data quality values, then you should specify #ONLYGOOD as the Query Criteria String. See Query Modifiers.
  6. In the Query Time section enter values of time in the Start Time and End Time fields.
    You can also use relative time entries to this field. See Relative Time Entries.
  7. In the Sampling Type section, select a type from the drop-down list.
  8. The Calculation field is active only after you select Calculated Sampling as the Sample Type.
    Select a Calculation Algorithm type from the drop-down list.
  9. In the Sampling Interval section, select either the By Interval or By Samples option.
    The By Interval option displays two entry fields, Interval and Time Unit. Enter values in both. For example, to sample at 10 minute intervals, enter 10 in the interval field and select Minutes in the Time Unit field. The By Samples option displays a Number of Samples field.

    To specify a number of samples for the data query, enter a number in this field. For example, to query 100 samples, enter 100 in this field.

  10. In the Filter Definition section, enter filter parameters in the fields for Filter Tag, Filter Comparison, Include Date Where Value Is Equal To, and Include Times.
    These fields are optional. If you do not enter any values, the query returns all values without filtering.
  11. In the Fields To Export section, select one or more fields.
    To select multiple individual tags, press the Control key and click the tagnames. To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
  12. In the Export Options section, select one of three options:
    • To New Worksheet
    • To CSV File or
    • To XML File
  13. If you select To CSV File or To XML File, you must enter a file name and path for the new file in the File Name field.
  14. Click OK to initiate the export. Click Cancel to abort the operation and close the dialog.

Importing Data

The Import Data command is the converse of the Export Data command. It moves selected information from your current worksheet into the specified Server in the same way the Import Tags command functions.
Note: If you use the Active Hours setting while importing data using the Excel Add-In, note that if the first tags imported are not within the Active Hours settings, no subsequent tags will be returned on that import (even if they are within the set active hours).
  1. Select Administration and then select Import Data from the Historian 7.1 menu.
    A message box appears.
  2. Click Yes to initiate the operation. If successful, a dialog box appears confirming the completion of the import function.
    Click OK to close the dialog box. If errors occur on the import, a dialog box appears detailing the issues encountered in the import. If an error occurs in any line of the import, the whole import is aborted.

Searching Messages

The Search Messages function lets you search the archives for selected types of messages generated during a specific time period and to display selected fields from those messages. This puts a dynamic formula in the worksheet. Dynamic formulas allow you to build a dynamic message report that you can build, save, and re-use.

  1. Select Administration and then select Search Messages from the Historian 7.1 menu.
    The Historian Message Search dialog appears.
  2. Select a server from the drop-down list. If you do not specify a server, the Add-In uses the default server.
  3. In the Topic field, select one of the message types from the drop-down list.
  4. In the Query Times fields, enter values for start time and end time.
  5. In the Search String section, enter a search string for scanning the text of messages. You do not need to enter *s for wildcards.
  6. In the Output Display section, select one or more parameters for the output display. Click a name to select it.
    To select multiple individual tags, press the Control key and click the tagnames. To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
  7. Click in the Output Range field and select a range of cells in a single row or column to determine where the returned data is placed.
  8. Select Asc or Desc to sort the messages in ascending or descending order.
  9. Select either Columns or Rows for the output display. Selecting Columns displays a table of values with parameters arranged in columns with header labels at the top. Selecting Rows rotates the table 90 degrees.
    Note: When selecting multiple tags, the orientation of the return data is based on the orientation of the selected tags and the Row/Col selection is ignored.
  10. Click OK to execute the search. Click Cancel to close the dialog box.

Exporting Messages

The Exporting Messages function lets you find messages and export them from the server to your worksheet or to a CSV or XML file. You can specify the server and select the messages to be exported by specifying a start time, an end time, or a text string, using standard wildcards, where applicable.

You can also select which fields of the messages are exported, such as time stamp, topic, message string, message number, substitutions, or username.

  1. Select Administration and then select Export Messages from the Historian 7.1 menu.
    The Export Messages From Historian 7.1 dialog box appears.
  2. Select a server from the drop-down list. If you do not specify a server, the Add-In uses the default server.
  3. In the Topic field, select one of six types of messages from the drop-down list.
  4. In the optional Filter Criteria fields, enter values for start time, end time, and search text string in the appropriate fields.
  5. In the Fields to Export section, select one or more field names from the displayed list.
    To select multiple individual tags, press the Control key and click the tagnames. To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
  6. In the Export Options section, select one of three options:
    • To New Worksheet
    • To CSV File
    • To XML File

    If you select To CSV File or To XML File, you must enter a file name and path for the new file in the File Name field.

  7. Click OK to initiate the export. Click Cancel to abort the operation.

Importing Messages

The Importing Messages command writes all messages from the worksheet into the server. When you initiate the import function, a dialog box asks if you want to import messages from your worksheet into a specified server.

If you reply Yes, it scans your worksheet for messages, writes them to the server, and notifies you that the operation succeeded or failed. If you choose to export messages from Historian 7.1 into Excel and then import the messages back into the Historian 7.1, note that the Importing Messages function only allows you to add messages to the Historian Server. It does not allow you to modify or remove any existing messages.

  1. Select Administration and then select Import Messages from the Historian 7.1 menu. A message box appears.
  2. Click Yes to execute the import. A dialog box appears when the operation is complete. Click OK to close the dialog box.
    If errors occur in the import, a dialog box appears detailing the issues encountered in the import. If an error occurs in any line of the import, the whole import is aborted.

Listing Archives

The List Archive function returns a list of selected statistics about an archive file. You can specify the server, the archive file name, and the type of information displayed, such as start time, end time, file name, target file size, current file size, current or read-only status, last backup time, and last backup users. You can also specify a range of cells for the display.

  1. Select Administration and then select List Archives from the Historian 7.1 menu.
    The Historian Archive List dialog box appears.
  2. Select a server from the drop-down list. If you do not specify a server, the Add-In uses the default server
  3. In the Archive name field, enter an archive name. Do not use wild cards in this field.
  4. In the Output Display section, select one or more parameters for the output display.
    To select multiple individual tags, press the Control key and click the tagnames. To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
    Note: The List Archives Query sorts by archive start time. The archive list will be sorted based on start time whether this field is selected or not.
  5. Click in the Output Range field and select a range of cells in a single row or column to determine where the returned data is placed.
  6. Select Asc or Desc to sort the archives in ascending or descending order.
  7. Select either Columns or Rows for the output display. Selecting Columns displays a table of values with parameters arranged in columns with header labels at the top. Selecting Rows rotates the table 90 degrees.
    Note: When selecting multiple tags, the orientation of the return data is based on the orientation of the selected tags and the Row/Col selection is ignored.
  8. Click OK to execute the search. Click Cancel to close the dialog box.
    Note: To return details for more than one item, specify a substring in the Archive Name field that exists in each archive you want listed. For example, if you had archives Hero5_Archive0001 -010, you could specify the substring Hero5_Archive to return the details for all those archives.

Listing Collectors

The List Collectors function returns a list of selected statistics about a collector. You can specify the server, the collector name, and select the type of information displayed. You can also specify the range of cells for the display.

  1. Select Administration and then select List Collectors from the Historian 7.1 menu.
    The Historian Collector List dialog box appears.
  2. Select a server from the drop-down list. If you do not specify a server, the Add-In uses the default server.
  3. In the Collector name field, enter a Collector name. Do not use wild cards in this field.
  4. In the Output Display section, select one or more parameters for the output display.
    To select multiple individual tags, press the Control key and click the tagnames. To select a sequence of tags, press the Shift key and click the first and last tagname of the sequence.
  5. Click in the Output Range field and select a range of cells in a single row or column to determine where the returned data is placed.
  6. Select Asc or Desc to sort the messages in ascending or descending order.
  7. Select either Columns or Rows for the output display.
    Selecting Columns displays a table of values with parameters arranged in columns with header labels at the top. Selecting Rows rotates the table 90 degrees.
    Note: When selecting multiple tags, the orientation of the return data is based on the orientation of the selected tags and the Row/Col selection is ignored.
  8. Click OK to execute the search. Click Cancel to close the dialog box.
    Note: To return details for more than one item, specify a substring in the Collector Name field that exists in each collector you want listed. For example, if you had collectors Hero5_Collector0001 -010, you could specify the substring Hero5_Collector to return the details for all those collectors.

Tag Criteria List

The following table outlines the tag criteria available:

Criteria Description
Tagname Tagname or tag mask property of the tag.
Description User description of the tag.
Data Type The data type of the tag.
Collector Name Name of the collector responsible for collecting data for the specified tag.
Collector Type The type of collector responsible for collecting data for the tag.
Note: Do not use wildcards in this field.
Collection Type Type of collection used to acquire data for the tag.
Data Store Name Indicates the name of the Data Store to which the tag belongs to.
EGU Description Indicates the engineering units assigned to the tag.
Note: Do not use wildcards in this field.
Comment Comments that is applied to the tag.
Note: Do not use wildcards in this field.
Source Address The address for the selected tag in the data store.
Note: Do not use wildcards in this field.
Collection Interval The time interval between the readings of data. The value entered is in milliseconds.
Collector Compression Whether or not collector compression is enabled as a default setting.
Archive Compression Indicates the current effect of archive data compression.
Last Modified User The name of the person who last modified the tag configuration parameters.
Enumerated Set Name Indicates the enumerated set name associated with the tag.