Historian Module (How-to Guide) walks you through configuring the Historian module to store time-series data for historical analysis and trending.

Prerequisites:

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

In this page:



Historian → Tutorial | Concept | How-to Guide | Reference



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

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 ??
  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

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
ArchiveLocationDatabase destinationTagHistorian
SaveOnChangeStore when value changesTrue
TimeDeadbandMinimum interval between saves00:00:05
TriggerCondition to force storageTag.ProductionRun
LifeTimeDays to retain data90


Storage Strategies

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

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

Configure Advanced Options

Normalized vs Standard Tables

TypeWhen to UseStructure
StandardSame data types, synchronizedOne column per tag
NormalizedMixed types, asynchronousGeneric 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

Test and Monitor

Testing Data Collection

  1. Start Runtime:
    • Press F5 or click Run Test
    • Go to Historian → Monitor
  2. Verify Archiving:
    • Check RowCount increasing
    • Monitor LastStoredTimeStamp
    • Review ErrorCount
  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 Scripts

Query historical data:

csharp

// Get last 24 hours of data
DataTable data = @Historian.Table.ProcessData.QueryData(
    DateTime.Now.AddDays(-1),
    DateTime.Now
);

SQL Queries

For SQL-based storage:

sql

SELECT * FROM ProcessData 
WHERE UTCTimeStamp_Ticks > [timestamp]
AND TagName = 'Tank.Level'

Common Issues

Data Not Archiving

  • Verify HistorianTable 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 Checklist

  • 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

Next Steps

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


In this section...



  • No labels