Versions Compared

Key

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

Configure historian tags and test with historian monitor trend chart.

TutorialsHistorian | Tutorial| How-to Guide | Reference


This Tutorial Teaches

Historian: Store & Trend Data (Tutorial) teaches

you to:

  • Configure historian storage
  • Select tags for logging
  • Create trend displays
  • Query historical dataTest historian using monitor

Prerequisites:

In this page:

Table of Contents
maxLevel2
minLevel2
indent10px
excludeStepsTeaches
stylenone



Configure Storage Location

  1. Optional (You can the default TagHistorian DB)
  2. Navigate to Historian → Storage
  3. Configure database:

Default SQLite (Development):

  • Type: SQLite
  • Path: Default or custom
  • File Size: 1GB per file
  • Auto-create: Yes

SQL Server (Production):

  • Type: SQL Server
  • Server: SQLServer\Instance
  • Database: FrameworX_History
  • Authentication: Windows/SQL

1. Create Historian Tables

  1. Go to Historian → Historian Tables
  2. Create tabletables:

Process Data:

  • Name: ProcessDataType
  • Save On Change: Continuous (tick)
  • Storage: 1 second resolution
  • Retention: 90 days
  • Compression: Deadband
  • Auto Create: (tick)

Production Counters:

  • Name: ProductionType
  • Save On Change: Counter (tick)
  • StorageAuto Create: On change
  • Retention: 365 days
  • (tick)



2. Configure Tags for Logging

  1. Navigate to Historian → Historian Tags
  2. Add tags to log:

Analog ValueProcess Data:

  • Tag: TankFarm/Tank1_/Temperature
  • Table: ProcessData
  • Deadband: 0.5
  • RateRateOfChange: 10 seconds

Digital ValueProduction Data:

  • Tag: Motor1_Running
  • Table: ProcessData
  • Log: On change only

Production Count:

  • Tag: Units_ProducedProduction/Production_Count
  • Table: Production
  • Type: Counter/Totalizer

Create Trend Display

  1. Open Displays → New
  2. Add TrendChart page
  3. Configure:

Basic Setup:

  • Duration: 1 hour
  • Update: 1 second
  • X-Axis: Time
  • Y-Axis: Auto-scale

Add Pens:

  • Pen 1: Tank1_Temperature (Blue)
  • Pen 2: Tank1_Pressure (Red)


  • Pen

    3

    : Motor1_Running (Green, digital)

    Configure Trend Features

    Time Navigation:

    • Enable pan and zoom
    • Add time selector
    • Quick ranges: 1hr, 8hr, 24hr, 7 days

    Analysis Tools:

    • Cursors for value reading
    • Min/Max/Average display
    • Export to CSV

    Query Historical Data

    Using SQL queries:

    sql

    SELECT Timestamp, TagName, Value 
    FROM ProcessData
    WHERE TagName = 'Tank1_Temperature'
      AND Timestamp > DATEADD(day, -7, GETDATE())
    ORDER BY Timestamp

    Using Scripts:

    csharp

    DataTable history = @Historian.GetData( "Tank1_Temperature", DateTime.Now.AddDays(-7), DateTime

    .

    Now, 1000 // Max points );

    Create Reports

    1. Reports → New
    2. Add data source:
      • Type: Historian Query
      • Tags: Select multiple
      • Period: Shift/Day/Month
      • Aggregation: Average, Min, Max

    Storage Management

    Configure data management:

    Compression:

    • Deadband: ±0.5% of range
    • Time deadband: 60 seconds
    • Compression deviation: 1%

    Archiving:

    • Archive after: 30 days
    • Archive location: Network path
    • Compression: ZIP

    Purging:

    • Auto-purge: After retention period
    • Manual purge: By date range

    Test Historian

    1. Start Runtime
    2. Let run for few minutes
    3. Open trend display
    4. Verify:
      • Data logging active
      • Trends updating
      • Historical data visible
      • Zoom/pan working
    5. (change tags values manually using PropertyWatch)
    6. Go to Historian → Historian Monitor
    7. Add both tags to the trend and see the values based on the time



    4. Performance Optimization

    • Log only necessary tags
    • Consider multiple historian table with distinct triggers
    • Monitor disk space

    Next Steps

  • [Create Dashboards] - Historical KPIs
  • [Reports Module] - Automated reports
  • [Datasets Module] - SQL analysis

    Excerpt Include
    Historian Module
    Historian Module
    nopaneltrue


    In this section...

    Page Tree
    root@parentspaces93DRAF