Академический Документы
Профессиональный Документы
Культура Документы
Working Together
7/24/2017
Outline
Introduction
Data Types
Data Migration
Extraction Routine
Summary/Conclusion
7/24/2017
Introduction
PI and SQL server offer two distinct ways to
represent data to end-user:
Time-based
Event-based
Both representations are useful depending on:
How the data must be retrieved
Relationships between multiple data points.
7/24/2017
Introduction
7/24/2017
Introduction
I will describe:
How to create a routine to migrate PI time series
data into event-based data in SQL Server.
Pitfalls in correlating multiple tags
How to get around some challenges in PI.
7/24/2017
Data Types
Time Series Event Based
Continuous Discrete
Not tied to other data Tied to other data
Trend view Table view
Queried by multiple indices
Merged with non-PI data
7/24/2017
Data Types
Time-based data in a time series database
Temperature, Pressure, Kettle level
Valve position, Motor state, Alarm state
Totalized volume
7/24/2017
Data Types: Event Data
Queries and Grouping by:
Product Id
Production Unit
Category
Merging with other data:
Product Family
Genealogy
Discrete Lab Results
7/24/2017
Data Migration
7/24/2017
Data Migration: Steps
7/24/2017
Extraction Routine: Design Criteria
Allow access to file system and databases
Event and/or time triggered calculations
Handle all data types (float, integer, string, etc)
Back-date new values
Run as a background routine (ex: NT service)
Configurable from database tables
Parallel executions (Division of work; isolation)
7/24/2017
Extraction Routine: Implementation
7/24/2017
Extraction Routine: Configuration
Calculation Name
Enabled/Disabled (Allow dynamic update)
PI Point used as the Event Trigger
List of PI Points used as input
Reset Request
Statistics: # of triggers, time between triggers
(To measure backlogs and efficiency)
7/24/2017
Extraction Routine: Startup
Open the database (but close every 2 hrs)
Read the configuration information into
memory
Read initial PI snapshot values explicitly
Sign-up of updates in PI
Go to sleep
7/24/2017
Extraction Routine: Execution
Wakeup on timer
Get all exceptions since we last looked
Scan exceptions for trigger values
or
Read the set of string values since the last
time
Execute event logic to record the data
Record the calculation statistics
7/24/2017
Go to sleep
Execution Routine: Enhancements
Calculation Catch-up
(Allow reading of archive data)
Sort exceptions by time before processing
(Handle with calculation interaction)
7/24/2017
Summary
Design logic to allow staggered timestamps
Store data for efficient data retrieval
Use an NT Service for automatic startup
Use multiple executables for production
facility isolation to help handle downtime
Load balance data extraction
7/24/2017
Conclusion
OSI has provided the methods to take
your data anywhere you need to go:
File system, database
Command execution: Report generator
UDP message, FTP transmission
E-mail, Pager notification
7/24/2017
Questions?
7/24/2017