Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide walks you through configuring the Historian module to store time-series data for historical analysis and trending. You'll create historian tables, configure tags for archiving, set up storage locations, and retrieve historical data.

Prerequisites:

  • Tags created in UNS
  • Understanding of data retention requirements
  • Database available (SQLite default or external)


Panel
borderWidth1
borderStylesolid
titleOn this Page:

Table of Contents
maxLevel2
minLevel2



Configuration Workflow

  1. Configure Storage Location - Define where data is stored
  2. Create HistorianTables - Group tags with common settings
  3. Add HistorianTags - Select tags to archive
  4. Configure Triggers - Define when to store data
  5. Test Data Collection - Verify archiving and retrieval

Step 1: Configure Storage Location

Using Default SQLite Database

The platform includes SQLite by default. No configuration needed unless changing settings.

Changing Default Database

  1. Navigate to Historian → Storage Locations
  2. Click Settings icon (gear)
  3. Configure:
    • Provider: Database type (SqlClient, PostgreSQL, etc.)
    • Database: Specific database system
    • Server IP: Database server address
  4. Click Test to verify connection
  5. Click OK

Adding External Historians

  1. Go to Historian → Storage Locations
  2. Click Plus icon
  3. Configure:
    • Name: Storage identifier
    • Storage System: Select "Tag Provider"
    • Protocol: Choose historian (Canary, InfluxDB, PI)
    • StoreAndForward: Enable for buffering
  4. Configure connection string
  5. Click OK

Step 2: Create HistorianTables

HistorianTables group tags with shared storage settings.

Creating a Table

  1. Navigate to Historian → HistorianTables
  2. Click Plus icon
  3. Configure properties:
PropertyDescriptionExample
TableNameTable identifierProcessData
StorageLocationDatabase destinationTagHistorian
SaveOnChangeStore when value changesTrue
TimeDeadbandMinimum interval between saves00:00:05 (5 seconds)
TriggerCondition to force storageTag.ProductionRun
LifeTimeDays to retain data90
  1. Click OK

Storage Strategies

StrategySaveOnChangeTimeDeadbandTriggerUse Case
High-SpeedYes00:00:01-Critical process variables
StandardYes00:00:10-Normal process monitoring
PeriodicNo-Timer.1MinRegular snapshots
Event-BasedNo-Tag.BatchStartBatch data collection

Step 3: Add HistorianTags

Configuring Tags for Archiving

  1. Go to Historian → HistorianTags
  2. Add tags using one of these methods:
    • Type tag name in first column
    • Browse and select from tag list
    • Copy/paste from UNS Tags
  3. Configure for each tag:
PropertyDescriptionWhen to Use
TagNameTag to archiveRequired
HistorianTableTarget tableRequired
DeadBandChange thresholdPrevent small variations
DeviationSignificant changeOverride time deadband
RateOfChangeChange rate limitDetect rapid changes

Example Configurations

Tank.Level        → Table: ProcessData, Deadband: 0.5
Pump.Status       → Table: EventData, Deadband: 0
Reactor.Temp      → Table: CriticalData, Deadband: 0.1, RateOfChange: 5
Production.Batch  → Table: BatchData, Trigger-based

Step 4: Configure Advanced Options

Normalized vs Standard Tables

TypeWhen to UseStructure
StandardSame data typesOne column per tag
NormalizedMixed data typesGeneric value columns

Quality Tracking

Enable SaveQuality in HistorianTable to:

  • Store OPC quality with values
  • Show gaps in trend charts
  • Identify communication issues

Store and Forward

For external historians:

  1. Enable StoreAndForward in Storage Location
  2. System buffers data during connection loss
  3. Automatic forward when connection restored

Step 5: Test and Monitor

Testing Data Collection

  1. Start Runtime:
    • Press F5 or click Run Test
    • Go to Historian → Monitor
  2. Verify Archiving:
    • Check "Storage" column shows "Running"
    • Monitor "Count" increasing
    • Verify "Last" timestamp updates
  3. Test Retrieval:
    • Add TrendChart to display
    • Select historian tags
    • Verify historical data appears

Using TrendChart

  1. In Displays → Draw
  2. Add TrendChart control
  3. Configure:
    • Tags: Select historian tags
    • Duration: Time span to display
    • Navigate: Pan and zoom tools

Data Retrieval

In Displays

Use TrendChart control for visualization:

@Historian.Query(tag, startTime, endTime, interval)

In Scripts

Query historical data:

csharp

// Get last 24 hours of data
DataTable data = @Historian.GetData(
    "Tank.Level", 
    DateTime.Now.AddDays(-1), 
    DateTime.Now,
    TimeSpan.FromMinutes(1)
);

SQL Queries

For SQL-based storage:

sql

SELECT * FROM ProcessData 
WHERE UTCTimestamp > '2024-01-01' 
AND TagName = 'Tank.Level'

Common Issues

Data Not Archiving

  • Verify HistorianTable is configured
  • Check tag exists and updates
  • Confirm trigger conditions met
  • Verify storage location connection

Gaps in Data

  • Check TimeDeadband settings
  • Verify SaveOnChange configuration
  • Review deadband values
  • Enable SaveQuality for visibility

Storage Full

  • Configure LifeTime for auto-deletion
  • Archive old data externally
  • Increase storage capacity
  • Optimize storage settings

Poor Query Performance

  • Create appropriate indexes
  • Limit query time ranges
  • Use aggregation functions
  • Enable caching

Best Practices

? Plan retention strategy - Balance storage vs. analysis needs ? Use appropriate deadbands - Reduce storage without losing significant changes ? Group similar tags - Tables by update frequency and retention ? Monitor storage growth - Track database size trends ? Test retrieval performance - Verify query response times ? Document table purposes - Clear naming and descriptions ? Regular maintenance - Archive or purge old data


Notes for Concept Document Enhancement

Consider adding to the Historian Concept document:

  • Comparison of storage strategies (event vs. time-based)
  • Data compression techniques
  • Integration with external historians architecture
  • Store-and-forward mechanism details
  • Performance optimization guidelines

Next Steps

  • [TrendChart Control →] Visualize historical data
  • [Reports Module →] Create historical reports
  • [Scripts Module →] Query and process historical data

In this section...

Page Tree
root@parent
spaces93DRAF