Skip to main content

PLC Data Logging and Historian Integration

By NFM Consulting 4 min read

Key Takeaway

PLC data logging captures time-series process data for historical trending, regulatory compliance, production reporting, and root cause analysis. Integration with process historians like OSIsoft PI, Wonderware Historian, or Ignition stores millions of data points efficiently using compression algorithms, enabling years of high-resolution operational data retrieval.

Why Data Logging Matters

Industrial process data has enormous value beyond real-time control. Historical data enables root cause analysis of equipment failures, trend analysis for predictive maintenance, regulatory compliance documentation, production efficiency optimization, and energy management. Without systematic data logging, facilities lose the ability to answer critical questions: What happened before the compressor tripped? Is pump efficiency degrading over time? Are we meeting environmental emission limits? Did we run the batch at the correct temperature for the required duration?

The challenge is capturing the right data at the right resolution, storing it efficiently for long-term retention, and providing fast retrieval for analysis and reporting. This is the domain of process historians and their integration with PLC control systems.

Data Logging Methods

PLC-Based Data Logging

Some PLCs can log data locally to onboard memory, SD cards, or USB drives. Allen-Bradley CompactLogix supports data logging to a removable SD card using the DataLog instruction. Siemens S7-1500 provides data logging to CSV files on the CPU's integrated web server. PLC-based logging is suitable for small systems, temporary troubleshooting, or standalone machines without network infrastructure. Limitations include storage capacity, no compression, limited retrieval tools, and risk of data loss if the storage media fails.

SCADA-Based Historization

SCADA platforms include built-in historical data storage. FactoryTalk Historian SE, Ignition's built-in historian, and VTScada's historian log data from PLC tags at configurable intervals. SCADA-based historians typically store data in relational databases (SQL Server, MySQL, PostgreSQL) or proprietary formats with compression. This approach is suitable for small to mid-sized systems where the SCADA server has adequate storage and processing capacity.

Enterprise Process Historians

Dedicated process historians are purpose-built for high-volume time-series data with efficient compression and fast retrieval:

  • OSIsoft PI (AVEVA PI): The industry-standard process historian with swinging-door compression that typically achieves 10:1 to 20:1 compression ratios. PI stores hundreds of thousands of tags with years of history on modest hardware.
  • Wonderware Historian (AVEVA Historian): Tight integration with Wonderware InTouch and System Platform. Uses SQL Server as the storage engine with proprietary compression extensions.
  • Ignition Historian: Open-source-friendly historian built on SQL databases with Tag Historian module. Integrates natively with the Ignition SCADA platform.
  • InfluxDB / TimescaleDB: Open-source time-series databases gaining traction in industrial IoT applications. Often paired with Grafana for visualization.

Historian Architecture

A well-designed historian architecture considers data collection, storage, and retrieval:

  • Data collection: OPC DA/UA interface servers connect to PLCs and feed data to the historian. Collection rates range from 100 ms for fast process variables to 60 seconds for slowly changing equipment status. Exception-based collection (report on change or deadband) reduces storage requirements.
  • Storage tiers: Recent data (days to weeks) is stored at full resolution on fast storage. Older data is progressively summarized (hourly averages, daily averages) and moved to cheaper storage. Multi-year retention requires a clear data lifecycle policy.
  • Compression: Swinging-door and boxcar compression algorithms eliminate redundant data points while preserving the essential shape of the data. A pressure signal that holds steady at 100 PSI stores only the first and last value rather than thousands of identical readings.
  • Retrieval: Client applications query historical data for trend displays, reports, and analysis. Performance depends on query time range, number of tags, and requested resolution. Downsampled data enables fast retrieval for long time ranges.

PLC-Side Configuration for Historian Integration

Effective historian integration requires attention to PLC program structure:

  • Tag organization: Group historian-logged tags with consistent naming conventions. ISA-5.1 naming (FIT_2001_PV, TT_3005_PV) allows automated tag import and organization in the historian.
  • Engineering units: Ensure all analog values are scaled to engineering units in the PLC before the historian collects them. Raw counts in the historian are useless for analysis.
  • Timestamps: For event-driven data (batch events, state changes, alarm activations), generate timestamps in the PLC for accurate event sequencing. PLC timestamps avoid network latency distortion.
  • Calculated values: Compute derived values (totalized flow, energy consumption, equipment efficiency) in the PLC and log them as historian tags for direct reporting access.

Reporting and Analysis

Historical data supports multiple reporting and analysis use cases:

  • Trend analysis: Compare current process behavior against historical baselines to detect degradation, fouling, or calibration drift.
  • Production reports: Automated daily, weekly, and monthly production summaries extracted from historian data, eliminating manual data entry.
  • Regulatory compliance: EPA emissions reporting, FDA batch records, and OSHA process safety documentation generated from historian data with audit trails.
  • Root cause analysis: After an incident, retrieve high-resolution data from all relevant tags to reconstruct the sequence of events leading to the failure.

Data Logging Best Practices

NFM Consulting implements historian integration with attention to data quality, storage efficiency, and retrieval performance. We configure appropriate scan rates and compression settings for each tag based on its process dynamics, implement exception-based collection where appropriate, and establish data lifecycle policies that balance retention requirements against storage costs. Our standard PLC programming templates include pre-configured historian tag groups for motors, valves, analog instruments, and PID loops that simplify historian configuration during commissioning.

Frequently Asked Questions

Ready to Get Started?

Our engineers are ready to help with your automation project.