Thursday, July 9, 2009


With batch event and LOG EVENT information going into the DeltaV version 10.3 Event Chronicle, you can start putting together simple views or what I’ve affectionately termed as Poor Man’s Batch Reporting (PMBR).

Process History View just doesn’t have the horsepower for the types of queries required. And that’s OK, because the Event Chronicle is a SQL database. So what I’ve done is link the alarms and events table into Access. This was easy because the ODBC data source is already setup for you in DeltaV:

Then I created two queries – one to get unique Batch ID’s and one to get the batch events. The Find Unique BatchIDs query looks like this in SQL:

SELECT Right(Events1!Attribute,Len(Events1!Attribute)-InStr(1,Events1!Attribute," ")) AS BatchID
FROM Events1
GROUP BY Right(Events1!Attribute,Len(Events1!Attribute)-InStr(1,Events1!Attribute," ")), Events1.Attribute
HAVING (((First(Events1.Attribute)) Like "@*") AND ((Count(Events1.Attribute))>1));

Executing this gives:

The Batch Events query required a parameter (well it did for me, anyway, but I am no SQL guru – I’m sure someone out there can do a better job), its SQL looks like this:

PARAMETERS BatchID Text ( 255 );
SELECT Events1.Date_Time, Events1.State, Events1.Desc1, Events1.Desc2
FROM Events1
WHERE (((Events1.Attribute) Like "*" & [BatchID])) OR (((Events1.Desc1) Like "*" & [BatchID]))
ORDER BY Events1.Date_Time;

When I run the query, I get prompted for the BatchID:

And the results look like this:

The pressure drop data was captured with the LOG EVENT function in the FERM_PTEST phase.

So here's a way to generate some simple batch reports without dealing with those pesky EVT files. Head over to my website - I'll be consolidating the 3 posts about batch events/reports into a whitepaper.

No comments: