Вы находитесь на странице: 1из 11

Easilyy get

g Alarm,, Event or
PDL data from your database

JJason Shearin
Sh i
Process Automation Engineer

© The Lubrizol Corporation 2010, all rights reserved


Presenter

ƒ Jason Shearin

2 © The Lubrizol Corporation 2010, all rights reserved


Overview
• Why do I need to access our historical data?

• How to access the historical data

• Creating reusable reports

• Method of getting data into IM via Batch

3 © The Lubrizol Corporation 2010, all rights reserved


Why do I need to access our historical data?

• Material Balance

• Process improvement

• Trouble shooting

• Alarm Management

4 © The Lubrizol Corporation 2010, all rights reserved


How to access the database.

• Launch Excel
• Data > Import External Data > New Database Query
g need to install
On the first time launched Excel might
the query tool.
On the pop up uncheck the box for Use the Query Wizard
• Now select your database from the list. On the IM
machine select localhost.
• User = history Password = history

5 © The Lubrizol Corporation 2010, all rights reserved


Select the Correct table?
• For IM table description see ABB Document
3BUF001094R5011 Appendix B pg 649-
• You are in a viewing tool look around and see what
information is available.
available

6 © The Lubrizol Corporation 2010, all rights reserved


Alarm & Event Data
• Select the correct MSGxxxx Table

• Select a Item and set up a filter (criteria)

• Select a second Item and set up a AND or OR criteria

• Show how to use the Parameters Excel Functionality in


query
q y wizard in the criteria field use [ ] to define your
y
variable.

7 © The Lubrizol Corporation 2010, all rights reserved


Setting Properties and Parameters in Excel
• Bring the Data into Excel

• Right click on query data Set up password save in Data


Range Properties
• Set Parameters to look at specific cells
• If desired check one cell to Refresh automatically when a
cell value changes

8 © The Lubrizol Corporation 2010, all rights reserved


Material Balance
• Show the D line example and how it is created

• For my Batch data I use the Task Table and the


TASK VARIABLES OCCURRENCES T
TASK_VARIABLES_OCCURRENCES Table
bl JJoined
i dbby
taskid

9 © The Lubrizol Corporation 2010, all rights reserved


How to create a view in Oracle
• This is how to create a view. This converts the TASK_VARIABLES_OCCURRENCES table into a
view where the variablevalue field is a number not a string. The VARIABLEVALUE field is
renamed to VARIABLEVALUENUM
• from a CMD window type sqlplus
• User name ops$ocshis
• Password ocshis
• create or replace view TASKVAROCCVALasNUM as SELECT
TASK_VARIABLES_OCCURRENCES.TASKID,
S S OCC C S S TASK_VARIABLES_OCCURRENCES.NAME,
S S OCC C S
TASK_VARIABLES_OCCURRENCES.OCCURRENCE,
TASK_VARIABLES_OCCURRENCES.APPLICATIONOCCURRENCE, to_number
(TASK_VARIABLES_OCCURRENCES.VARIABLEVALUE) VARIABLEVALUENUM,
TASK_VARIABLES_OCCURRENCES.VARIABLETIME,
TASK VARIABLES OCCURRENCES.VARIABLETIMEUTC,
TASK_VARIABLES_OCCURRENCES.VARIABLETIMEUTC,
TASK_VARIABLES_OCCURRENCES.VARIABLETIMEMSEC,
TASK_VARIABLES_OCCURRENCES.STATUS,
TASK_VARIABLES_OCCURRENCES.RESULTVALUE,
TASK_VARIABLES_OCCURRENCES.RESULTTIME,
TASK_VARIABLES_OCCURRENCES.RESULTTIMEUTC,
TASK VARIABLES OCCURRENCES RESULTTIMEMSEC
TASK_VARIABLES_OCCURRENCES.RESULTTIMEMSEC,
TASK_VARIABLES_OCCURRENCES.USERCOMMENT,
TASK_VARIABLES_OCCURRENCES.USERNAME,
TASK_VARIABLES_OCCURRENCES.ARCHIVESTATUS,
TASK_VARIABLES_OCCURRENCES.USERBLOBSIZE From
TASK_VARIABLES_OCCURRENCES;

10 © The Lubrizol Corporation 2010, all rights reserved


How to view a view created in Oracle
• from a CMD window

• sqlplus

• ops$ocshis
• ocshis

• SQL> set long


g 8000
• SQL> select text from user_views where view_name = 'PutYourViewHere';

• TEXT
• -------------------------------------------------------------------
• select name,taskid,to_number(variablevalue) value,variabletime
• from task_variables_occurrences

11 © The Lubrizol Corporation 2010, all rights reserved

Вам также может понравиться