Pim 1001
Pim 1001
Background Processing
Descriptions
User Guide
Copyright, Notices, and Trademarks
Honeywell, TotalPlant, Uniformance, and Business.FLEX are U.S. registered trademarks of Honeywell Inc.
Other brand or product names are trademarks of their respective owners.
Release Information
Uniformance 150
Revision 1
Revision Date: July 30, 1999
Document Number: PIM-100.1
Honeywell Inc.
Industrial Automation and Control
Automation College
2820 West Kelton Lane
Phoenix, AZ, 85023-3028
Contents
Copyright, Notices, and Trademarks ii
Release Information ii
Production Management 19
Batch Tracking 19
Lineups 19
Production Events 20
Batch Creation 20
Batch Remaining 22
Update Batch Processing Equipment Times 22
Lot Tracing 24
Tank Composition 24
Relational to PHD 25
Database Synchronization 25
Event Monitoring 28
Production Planning 29
Production Run Planning 29
Recipe Management 31
Recipe Synchronization 31
Configuration 32
Messaging 33
Details 34
Recipe Header Section 34
Recipe Detail Section 35
Sequence of Events 38
Application Management 45
Windows Report Scheduling 45
Application Server 47
Required Background Processes 47
BT Batch Tracking 55
Event Journal 55
Event Monitoring 56
Extract Scheduling 56
Instruction Scheduling 57
Interface Data File Loader 58
LDI Lab Data Integrator 59
LimitSet Refresh 60
MSGLOGSERVER 60
Operations Monitoring 60
PA Auto Reprocess 61
PA Nightly Processing 62
PHD_TO_REL 63
Product Movement Interface 63
Product Movement Scheduling 64
Production Schedule 65
Purge Background Process Status 65
Purge Interface Data 66
Purge LIMS Redo Log 66
Purge Message Log Data 67
Recipe Download 68
Recipe Synchronization 70
REL_TO_PHD 71
Robust PHD Data Distribution 72
Sample Scheduling 73
Tag Synchronization 74
Tank Composition 75
Event-Driven Applications 76
Event-Driven Scheduler 76
Event Subscription Details 77
IP_EVNT_PENDING table 77
Package and Stored Procedure 78
Index 79
vi • Uniformance Background Processing Descriptions User Guide
Introducing Background Processing
11. The system ends operation for the period indicated in the Sample Scheduler form
and resumes at step 1.
Production Management –
Production Accounting/Costing
• Finds all equipment/modes for the balance group where, in the equipment
configuration, the parent equipment is the balance group and the hierarchy type is
BALGROUP.
Process Instructions
• Retrieves all active instructions for the accounting period where the instruction
mode is part of the balance group.
• Retrieves all active product routing records which are of the same mode as the
instruction modes and where there is no switch tag associated with the routing.
• Inserts into the Balance Intermediate table (IP_BAL_PNT) the instruction time
frame, which must be within the time frame of the accounting day, instruction
information, and product routing information.
Process Dependents
• Retrieves all product movements for the accounting period and for the equipment
in the balance group where the equipment attribute is either MOVEDEST or
MOVESRC.
• Retrieves all bulk/bag loadings for the accounting period where the destination
equipment has the attributes BULK_BAG_DEST and either MOVEDEST or
MOVESRC'
• Retrieves active product routings of operation type MOVE for above movements.
• Converts the value of the movement to the balance units.
• Inserts the data into the Balance Intermediate table where no existing entry has the
same link name, source/destination, and mode encompassing either the start or end
dates as the record to be inserted.
• Retrieves all active product routing records with a not NULL Flow Switch Tag and
with an equipment/mode as part of the Balance Group, if the equipment of the
mode is not of equipment attribute INST, or when the equipment attribute is of
type INST, and there are entries in the Balance Intermediate table for the
equipment. This ensures that routings for inactive modes of operation for the
equipment are not retrieved.
• Calls PHD to get all switch activity for each switch tag over the accounting period.
• Inserts the data into the Balance Intermediate table where no existing entry has the
same link name, source/destination, and mode encompassing either the start date or
end date as the record to be inserted.
• Finds all active Product Routing records where the Static Route Indicator is
enabled (X) for the equipment in the Balance Group.
• Inserts into the Balance Intermediate table the static route records with the start
and end dates as the dates of the accounting period where an entry by the same link
name, source/destination, and mode does not already exist.
• Uses the results of the previous 6 steps combined with active Product Routing
records to generate both halves of the material transfer records.
• Retrieves each record from the Balance Intermediate table. The Product Routing
table is searched by mode and node to find the other end of the Intermediate
record. Then, the Intermediate table is searched using both halves of the routing
record looking for an overlap in time. If there is an overlap, the overlap time is the
time frame used to generate the material transfer.
• If the Intermediate record is a product movement and the Net Qty is 0, or the
record is not a product movement, uses the tag from the product routing and the
start and end of the overlap time to call PHD to retrieve the value of the material
transfer.
• Finds all material transfers with a NULL product name and replaces it with the
product name of the most recent material transfer for the equipment where the
product is not NULL. If the product cannot be determined, it defaults to
UNKNOWN.
• If the equipment has the attribute PRODUCT_TAG, retrieves the value in the tag
for the cutoff time and use that value as the product name.
• If the product name is still NULL, retrieves the last material transfer into that
equipment. Retrieves the product routing configuration entry (destination half) that
creates the transfer. If the USE ALTERNATE ROUTE flag is set, gets the next
previous transfer into that location.
• Updates the product of the Cutoff Inventory records using the product from the
material transfer record for the equipment. However, if during the time of the last
transfer a regrade occurred, uses the regrade product name.
Transfer Resolution
• Retrieves all material transfer records and replaces the resolved quantity with the
specified quantity if it exists, or with the measured quantity.
• For each material transfer record with a tag, calls PHD to get the tolerance value.
• Calculates adjusted tolerance:
− The adjusted tolerance = 0 if there is no tag associated with the Material
Transfer record.
− If confidence of value = 0 the adjusted tolerance = 999999999
− Otherwise, the adjusted tolerance = (PHD tag tolerance)/confidence.
• Creates Transfer Groups records from the set material transfer records.
− A new transfer group is created with a total number of members = 1 for each
material transfer record with a non-inventory equipment. The transfer group
quantity = material transfer measured quantity.
− A new transfer group (TG) record is created for each material transfer (MT)
with an inventory equipment where no prior TG record exists for the equipment
and where the TG time frame overlaps with the MT time frame. If a record is
created, the total quantity of the TG is the measured quantity of the MT. The
time frame of the TG is the time frame of the MT. If a TG exists for the
equipment with an overlapping time frame, increment the total number of
members in the TG by 1. The new time frame of the TG is the total time frame
spanned by both the TG and the MT.
• For each TG record:
− Retrieves the CUTINVTAG for the inventory equipment.
− Retrieves the inventory change over the time frame of the TG.
− Stores the inventory change with the TG record.
• Resolves TG's where only 1 member remains and MT records with a specified
quantity. Specified quantities are manually entered and therefore, assumed to be
the most reliable quantity.
− Finds MT record (REC1) for TG with 1 remaining member.
− Finds MT record (REC2) which is the other half of REC1.
− If neither MT record has a not NULL specified quantity, goes to step 1 for the
next TG with 1 remaining member.
− If REC1 specified qty is NULL and REC2 specified qty is not NULL set both
REC1 and REC2 resolved qty's = REC2 measured qty. else
− If REC2 specified qty is NULL and REC1 specified qty is not NULL set both
REC1 and REC2 resolved qty's = REC1 measured qty. else
− If REC2 specified qty is NULL and REC1 specified qty is not NULL then set
both REC1 and REC2 resolved qty's = REC1 measured qty. else
− If REC1 adjusted tolerance is < REC2 adjusted tolerance then
− If REC1 is an inventory equip then set multiplier = -1 if REC2 source/dest = 'S'
otherwise multiplier = 1 REC1 resolved qty = TG1 qty * multiplier -
SUM(resolved source qty's for TG1) + SUM(resolved destination qty's for
TG1) else REC1 resolved qty = REC1 measured qty REC2. resolved qty =
REC1 resolved qty else
− If REC2 adjusted tolerance is < REC1 adjusted tolerance then
− If REC2 is an inventory equip with only 1 remaining member in the TG then set
multiplier = -1 if REC2 source/dest = 'S' otherwise multiplier = 1 REC2
resolved qty = TG2 qty * multiplier - SUM(resolved source qty's for TG2) +
SUM(resolved destination qty's for TG2) else REC2 resolved qty = REC2
measured qty REC1. resolved qty = REC2 resolved qty else
− If REC1 adjusted tolerance is = REC2 adjusted tolerance then
− If REC2 is an inventory equip with only 1 remaining member in the TG then set
multiplier = -1 if REC2 source/dest = 'S' otherwise multiplier = 1 REC2
resolved qty = TG2 qty * multiplier - SUM(resolved source qty's for TG2) +
SUM(resolved destination qty's for TG2) REC1. resolved qty = REC2 resolved
qty else
− If REC1 is an inventory equip then set multiplier = -1
− If REC2 source/dest = 'S' otherwise multiplier = 1 REC1 resolved qty = TG1 qty
* multiplier - SUM(resolved source qty's for TG1) + SUM(resolved destination
qty's for TG1) REC2. resolved qty = REC1 resolved qty else REC1 resolved qty
= REC1 measured qty REC2 resolved qty = REC1 resolved qty decrement TG1
and TG2 remaining members by 1
• sets resolved flags for both REC1 and REC2
Perform Allocations
Production Management
Batch Tracking
The Batch Tracking background process performs various functions including the
following:
Lineups
Lineup Event entries are created for equipment with the attributes INVEV(inventory
event) or PRDCTNEV (production event). Batch inventory equipment such as silos
and tanks must have the INVEV attribute. Major production equipment must have the
attribute PRDCTNEV.
For this processing step to function properly, there must be valid product routing
information from the batch equipment back to the production equipment requiring
batch tracking. You may need to define routings through intermediate equipment.
Intermediate equipment is of no concern to the batch tracking process and does not
require the production or inventory event equipment attributes.
The following is the lineup event process for batch tracking background processes:
1. Find all active source product routing entries where the equipment has attributes
of INVEV or PRDCTNEV.
2. Fetch the next record.
3. If the routing from the step that called this one has no flow switch, find the
destination portion of the routing where the destination equipment has the
attribute EQUIP. If no entries exist, return to step 2.
4. If the destination record has no switch tag and the equipment is production
equipment, insert a lineup event entry.
5. If the equipment is not production equipment, continue through the routings
where the destination equipment is the source equipment and repeat step 2-8.
6. If the destination entry has a switch tag, call PHD and request the data for the
desired time frame.
7. If the equipment is production equipment and the switch is off, the system
updates the end date of a previous lineup event entry for the source and
destination equipment to the time the switch turned off. If the equipment is
production equipment and the switch is on, the system creates a new lineup
event entry using the switch on time as the start time and leaving the end date
NULL or blank until the switch closes later.
8. If the equipment is not production equipment and the switch is off, go back to
step 5 using the time frame the switch was open for.
Production Events
Batch Creation
Batch creation processing monitors switches and flow tags as defined in the Batch
Create Configuration form. When the switch tag is on (1) and the flow tag indicates
that product quantity greater than the threshold quantity has flowed into the batch
vessel, the process creates a new batch entry according to the batch template defined.
You can then view the batch entry using the Batch Entry form.
When the switch tag is off (0) for greater than the close minutes indicated in the
batch create entry, the system identifies the batch as closed (the end date of the batch
is set to the time when the switch tag closed).
Switch Tag
Flow Tag
Silo, Tank or
other Vessel
Batch Remaining
The purpose of the processing related to the remaining batch quantities is to calculate
the remaining quantity in each batch for equipment with the equipment attribute
BATCH_CALC_REM defined.
The following is a description of the Batch Remaining process:
1. Find all equipment with the equipment attribute of BATCH_CALC_REM.
2. Fetch the next equipment entry.
3. Get the inventory position of the equipment using the tagname found with the
equipment attribute INVTAG.
4. Get the list of batches for equipment where remaining quantity is greater than
(>) 0 in reverse chronological order.
5. While scanning the list, sum the remaining quantities until the sum is greater
than the total inventory. Adjust the remaining quantity of the batch the scan
stops at by the difference in the inventory quantity and the summed quantities
and then set the remaining quantity to 0 for all older batches with a remaining
quantity greater than (>) 0.
6. Go to step 2.
This background process determines the start and end dates when the processing
equipment was active for the batch. It also determines which product is produced by
the last product processing equipment in the line, using a process tag containing the
product produced by the equipment, or by looking at the active instruction during the
time frame.
The following is a description of the Update Batch Processing Equipment Times
process:
1. Find all batches that started or completed since the last time the program ran.
This information provides the start dates for the batch equipment records.
2. Fetch the record. If there are no more entries, then proceed to step 10.
3. Get the tags for the equipment where the attributes are OUTLETTAG and
INVTAG. The outlet flow tag provides the measurement for the quantity
flowing out of the equipment over a time frame and the inventory tag is the tag
that measures the volume of product within the equipment.
4. Using the current time and inventory tag, get the current volume of product
within the equipment.
5. Using the current date, the measurement tag, the flow tag and the current
volume, call PHD to determine how long it took to load the current volume into
the equipment. You may need to add to the change of volume using the
measurement tag, the volume that flowed out of the equipment, using the flow
tag, to determine the net volume that has flowed in during the time frame.
6. Find the connecting source equipment to the above equipment by searching the
Lineup Event table for the destination equipment over the time frame. If there is
no connection, go to step 2.
7. If the source equipment found in step 6 is a batch processing equipment for the
batch processed, update the start date using the date found in step 5.
8. If the source equipment is product processing equipment (attribute
PRODUCT_PRCSSNG) and the product of the batch is NULL, find the product
using one of the following methods:
• Get the tag defined through the Equipment Attribute Configuration form with
the attribute PRODUCT_TAG and get the product from the tag using the
date and time found in step 5.
• If the equipment does not have a PRODUCT_TAG attribute, get the active
instruction during the date found in step 5.
9. Using the source equipment as a destination equipment proceed to step 3.
10. Now that the start dates of the batch processing equipment are determined,
calculate the end dates.
11. Find all batch records where end date is between the time the program that was
last run and the current time.
12. Fetch the entry. If there are no more entries then exit the system.
13. Get each processing equipment record for the batch. Get the production run
name from the instruction active during the time frame of the processing
equipment record. Because there may be rounding errors in calculating the start
time of the processing equipment, is necessary to add an increment in time to
the start date in the case the start date falls into the previous production run.
This value is in hours and defined in the Value field of the equipment attribute
table, where the attribute is PRDCTNEV and optional.
14. From the production run get the volume percentage for the processing
equipment.
15. Multiply the volume percentage by the net batch quantity, and by using the
outlet flow tag where the equipment attribute OUTLETTAG, call PHD to find
out how long it took for the above volume to flow out of the equipment. The end
date is calculated by adding the time taken to flow out of equipment to the start
of the process.
16. Go to step 13.
Lot Tracing
The following is a flow diagram of the Lot Tracing background process. This process
runs once daily as part of the nightly processing.
Note: All flows and quantities are based on the material transfer records and cutoff
inventories. This application can then include manually entered product movements
that are not available automatically.
Gets the
process’s “Last Run Date”.
Adjusts the remaining quantity Gets each active Lot Tracing record and adjusts the total
for the active Lot Tracing entries. remaining quantity according to the Cutoff Inventory.
Get the End Date. Gets the date of the last accounting period that a material
transfer for the lot has been processed.
Updates the
“Process’s Last Run Date”.
Tank Composition
For more information, refer to the Uniformance Tank Composition Tracking User
Guide.
PHD to Relational
For more information, refer to the Uniformance Process History Database User
Guide.
Relational to PHD
For more information, refer to the Uniformance Process History Database User
Guide.
Database Synchronization
For more information, refer to the Uniformance Process History Database User
Guide.
Configuration
This process must be configured in the Background Process Configuration form. For
complete details, see Application Server in this document.
Messaging
Sequence of Events
1. distribtophd is launched. This only happens once. After that the program is
continuous.
2. The program aborts if insufficient parameters are passed or if errors occur while
trying to process parameters.
3. A database connection is attempted - if it fails to connect, an error message is
written to standard output
4. The program sets up for a read of all non-sent records from
IP_DATA_DISTRIB_PENDING.
5. The program reads the next record from IP_DATA_DISTRIB_PENDING. If no
more data is present, resume at step 12.
6. If in a send to PHD error state, check if TAGNAME or DATETIME is same as
last read TAGNAME or TAGNAME. If this is the case, log message, mark
record as being in error and indicate the skip reason. Resume at step 10.
7. Get the datatype for TAGNAME from PHD. Log the error message if an error is
encountered. Mark the record as being in error with the appropriate PHD error
message. Resume at step 10.
8. Send to PHD in two steps: phd_putdata() followed by phd_moddata(). Log the
error message if either fails. Mark the record as being in error with thee
appropriate PHD error message. Resume at step 10.
9. Mark the record as successfully sent.
10. Update the current record with success or failure status/message.
11. Return to step 5.
12. Delete all successfully sent records from IP_DATA_DISTRIB_PENDING.
13. Disconnect from the Oracle database.
14. Wait for X seconds where X represents the frequency in seconds.
Repeat from step 3.
If any fatal Oracle errors are encountered, the program displays the Oracle error
message (to standard output) and aborts.
The Alarm and Event Monitoring background process monitors for changes in tags.
When a change of state or value is detected, the process executes the tasks configured
for the alarm or event. There are two separate background processes, one for each
function.
Alarm Monitoring
For Alarm Monitoring, only on/off state value changes are monitored. Typically a
virtual tag is created that contains the logical evaluation of other process tags and the
virtual; tag returns either an on or an off result.
1. Get the last run date and time for the Alarm Monitoring process from the
Process Last Run table.
2. Select all active alarm log configuration entries.
3. Query PHD for an ON condition since the last run date for the alarm tagname.
4. If an ON state is detected during the period, the actions performed are based on
the alarm configuration options that can:
• automatically set PHD (and DCS tags if properly configured) tags
• send messages to printers or files
• set additional configuration options to define how long the alarm must occur
for before it is deemed to be detected
• set how often the alarm is rebroadcast
• set the alarm ended message
Event Monitoring
Event Monitoring can detect either on/off state value changes or changes in tag
values. Be careful when monitoring for changes in tag value. The tag is not expected
to contain a new value with every reading. This results in an event log entry for every
change in value, which may be every scan. Typically in this situation, virtual tags are
created to return distinct values for ranges of values for the scan tag. The virtual tag
value likely change less frequently and if configured properly identify the significant
changes the user is monitoring for.
Event monitoring does not alarm or notify users of detected events.
1. Get the process last run date and time for the Event Monitoring process from the
Process Last Run table.
2. Select all active event log configuration entries with event Type S (switch).
Select the last entry in the event log table and use the event end date (or start
date if end date is null) to determine the query start time. (If there are no entries
in the Event Log table, use the process last run date.) Query PHD using the
event tagname for an ON condition since the start date and time as determined
above. If an ON condition is detected, insert an entry into the event log with the
event name and the start time for the ON condition. If that event also turned
OFF to zero during the period, update the entry end time to be the time the event
went to OFF.
3. Select all active event log configuration entries with event type V (value) and
the get last stored value for the event tag from the Event Log table. If there is no
entry in that table, this is a new entry that uses the value NULL. Query PHD
(read raw to get only the changes and the actual times and dates of the changes)
for the values for the event tag since the process last run date. If there is no entry
in the Event Log table, insert one with the first value returned and the start date
and time for that first value. Compare the next value returned, if different update
the current (no end time and date) entry with the next value time and date and
insert a new entry with the new value and that time and date as the start time and
date. Repeat until all entries returned from the PHD query have been processed.
Production Planning
Recipe Management
Recipe Synchronization
It is possible to copy recipes from a local (sending) Uniformance Recipe
Management system to a remote (receiving) Uniformance Recipe Management
system.
The following is a list of functionality that the Recipe Synchronization performs:
• Recipes are selected on the sending system to be copied to the receiving system
For details, see Recipe Synchronization in the Form within this document.
• Recipes are synchronized via a background process configured to run at regular
intervals. For more information on arranging parameters for this process, see
Recipe Synchronization.
• Recipes that already exist in the receiving system are replaced.
• Recipes that do not exist in the receiving system are created.
• Recipes that exist in the receiving system which do not exist in the sending system
are unaffected.
• For each synchronized recipe, all Fixed Plant Databook support data is created for
that recipe. This includes: equipment, equipment group and equipment attribute
information, product, product specification and product attribute information,
property information, lookup type, and lookup value information.
• After the successful synchronization of a recipe, the changes are committed in the
receiving database and processing continues with the next recipe identified for
synchronization.
• After an unsuccessful recipe synchronization, the changes are rolled back in the
receiving database and processing continues with the next recipe identified for
synchronization. That is, partially synchronized recipes are not created.
Notes:
• The receiving system must be the same version as the sending system for recipe
synchronization to begin.
• In order for a recipe to be successfully synchronized, the tags within the recipe
must be defined in the destination system. If this is not the case, the recipe is not
synchronized.
Configuration
The Recipe Synchronization function is designed to be run as a regularly scheduled
background process.
The following is the Background Processes form showing an example of the
configuration needed for the Recipe Synchronization process:
Messaging
Messages are written to the Uniformance Message Log in the sending database at
various stages of the synchronization process. At minimum, the following messages
are written to the background process status log and can be viewed on the
Background Process Configuration form:
• Recipe synchronization start.
• Recipe synchronization end.
There are a variety of debug level messages that can be written to the Uniformance
Message Log. These messages are only written if the Recipe Synchronization
background process is configured with a message level of 6 (debug).
• Failure to connect the receiving database.
• Successful synchronization of a recipe.
• Failure to synchronize a recipe (plus reason for failure).
Details
The following sections explain the data elements copied from the sending system to
the receiving system.
Recipe Name If there is a recipe in the receiving system with the same name,
replace the record from the sending system.
Description Copied straight across. No verification is performed.
Equipment Based on equipment configuration with an attribute of EQUIP and
YIELD or RECIPE. The required equipment record and attributes is
created based on the sending system configuration.
Mode Based on the equipment configuration with an attribute of YIELD or
RECIPE and the equipment group configuration with a hierarchy type
of MODE. The required equipment, equipment attributes, and
equipment group records are created based on the sending system
configuration.
Product Based the product configuration with active products. If a
specification is defined for this product, it should also have an
attribute of SMPL. The required product and product attribute records
are created based on the sending system configuration.
Specification Name Based on product specification configuration. The product
specification header record is created based on the sending system
configuration.
Entered by Copied straight across. No verification is performed.
Active Copied straight across. No verification is performed.
Revision Date Copied straight across. No verification is performed.
Notes Copied straight across. No verification is performed.
The following fields appear on the Formulation Detail section of the Recipe
Management form:
Field Description
Material Based on product configuration with products that are active. A product
record is created based on the sending system configuration.
Units Based on lookup value configuration with:
• a lookup type of FORMULA_UNIT
The lookup type and lookup value records are created based on the
sending system configuration.
Target Copied straight across. No verification is performed.
Target Min Copied straight across. No verification is performed.
Target Max Copied straight across. No verification is performed.
Type Based on lookup value configuration with a lookup type of COSTTYPE.
The COSTTYPE lookup type record and the lookup value record are
created based on the sending system configuration.
Factor Copied straight across. No verification is performed
The following fields appear on the Formulation Detail section of the Recipe
Management form:
Field Description
Material Based on product configuration with products that are active. A product
record is created based on the sending system configuration.
Units Based on lookup value configuration with:
• a lookup type of FORMULA_UNIT
The lookup type and lookup value records are created based on the sending
system configuration.
Target Min Copied straight across. No verification is performed.
Target Max Copied straight across. No verification is performed.
Field Description
Type Based on lookup value configuration with a lookup type of COSTTYPE. The
COSTTYPE lookup type record and the lookup value record is created based
on the sending system configuration.
Factor Copied straight across. No verification is performed.
Sequence of Events
The background process is started with (at least) 3 parameters: source (sending)
database connection string, destination (receiving) database connection string, and
process name.
For example, -src user/password @ LOCALDB -dest user / password @
REMOTEDB. -pn "RECIPE SYNC".
A fourth parameter, /debug, is optional.
If present, debugging information is provided to standard output (in addition to any
message logging taking place). The database connection strings must contain at least
a slash ( / ), an at sign (@), and a database alias, for example, /@ dbalias.
The username and password are optional. If not supplied, the WindowsNT username
running the process connects to Oracle (prefixed with whatever
OS_AUTHENT_PREFIX is configured at the database - the default is OPS$). The -
pn (process name) parameter must match up with a process name in the TPI's
Background Process Configuration form. Passing the process name facilitates the
configuration of more than one recipe sync process.
1. The background process connects to both source and destination databases. If
the source database connection fails, an error message is written to standard
output and the program exits with a –1 return code. If the destination database
connection fails, write error message to source database message log and status
log indicating the failure. Exit program with a –1 return code.
2. A status message is written to source database indicating that the process
started.
3. Get version from both source and destination database. Ensure the versions are
the same. If not, write an error message to message log and a status message
(both to source database) indicating the error and exit program with a –1 return
code.
4. Move the cursor to read all recipes awaiting synchronization (source database).
5. The next recipe is read from all recipes awaiting synchronization.
6. If there are no more recipes to read, the system continues processing at step 15.
7. Verify with the destination system that the recipe can be synchronized. The
following condition must be present:
All tags within the recipe exist in the destination system. If any of the conditions
are not met the current recipe is not synchronized. A message is written to the
error log and a status message is written indicating the failure to synchronize the
recipe. A ROLLBACK occurs and the system continues processing at step 6.
8. Check if the recipe exists in destination system.
Note: For records that already exist, duplicate key errors occur. These errors are
ignored and error messages are not generated. Processing is allowed to continue
unhampered.
Using the Recipe Header Information
• Create equipment record for given equipment.
• Create equipment attributes record(s) for given equipment.
• Create equipment record for given mode.
• Create equipment attribute record(s) for given mode.
• Create equipment group record(s) for given mode.
• Create product record for given product.
• Create product attributes for given product.
• Create recipe record - copy of the source.
11. If recipe synchronized successfully, that is, all steps performed without error, the
transaction is committed and processing continues at step 6. A transaction is
defined as the unit of work comprising the recipe, recipe detail, recipe
components, recipe produced, equipment, equipment attributes, equipment
groups, products, product attributes, lookup type and lookup records inserted or
updated during the synchronization of a recipe. Only after a recipe is completely
synchronized with the destination database can a COMMIT be issued.
12. If a serious error occurs during the synchronization of a recipe, the transaction
must be rolled back, further processing ceases, error messages are written to
message log, and status log and the program exits with a -1 (failure) return code.
If the error is due to a recipe check failure, that is, the recipe cannot be
synchronized due to failure to meet sync criteria, further processing is allowed to
continue with the next recipe awaiting synchronization.
13. After all recipes are synchronized, delete recipes awaiting synchronization that
successfully synchronize. This does not mean remove the recipes, rather, remove
the recipe from the recipes pending synchronization list on the Recipe
Synchronization form. Commit the deletes when complete.
14. A status message is written to source database indicating that the process has
ended.
15. Disconnect from both databases and exit with 0 (success) return code.
Application Management
11. The system ends operation for the period indicated in the Report Scheduler form
and then resumes at step 1.
Application Server
Alarm Monitoring
Execution Statement:
Operating System Name: NT
Start Statement: op_alarm
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connection
string. If left NULL, the
Scheduler defaults it to
the account and database
that it connects with.
Execution Statement:
Operating System Name: NT
Start Statement: auto_create_instrctn
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connection
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.
Valid values:
• NO – do not
create the
Instruction if
validation fails.
(default)
• YES – create
the Instruction
even if validation
fails.
• NO – do not
download to
PHD if validation
fails. (default)
• YES – download
to PHD even if
validation fails.
Execution Statement:
Operating System Name: *
Start Statement: BlendMgmt.ProcessBlendData
Parameter Default Seq Parameter Value Description
Value Required Required
MSGLOG_DI No No Defines the directory name
R where the file containing
message log data is located.
Execution Statement:
Operating System Name: NT
Start Statement: BlendPHDCharacteristics
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections string. If left
NULL, the Scheduler defaults to the
account and database that it
connects with.
Execution Statement:
Operating System Name: NT
Start Statement: IFC_FileLoader
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connection
string. If left NULL, the
Scheduler defaults to the
account and database
that connects with it.
BT Batch Tracking
Execution Statement:
Operating System Name: NT
Start Statement: Batch_Tracking
Parameter Default Seq Parameter Value Description
Value Required Required
Event Journal
Execution Statement:
Operating System Name: NT
Start Statement: evt_jrnl
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to the
account and database that
it connects with.
Event Monitoring
Execution Statement:
Operating System Name: NT
Start Statement: op_event
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes Yes Database connections
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.
Extract Scheduling
Execution Statement:
Operating System Name: NT
Start Statement: ext_sched
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.
Instruction Scheduling
Execution Statement:
Operating System Name: NT
Start Statement: SCHED
Parameter Default Seq Parameter Value Description
Value Required Required
EXEC_FREQ_HRS 1 Yes Yes Execution frequency of
the process in hours. It
must match the
configured execution
frequency that the
scheduler uses.
Execution Statement:
Operating System Name: NT
Start Statement: IFC_FileLoader
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.
Execution Statement:
Operating System Name: NT
Start Statement: limstoqm
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRIN 1 Yes No Database connections string. If
G left NULL the Scheduler defaults
to the account and database that
it connects with.
• 1 – Admin
• 2 – Warning
• 3 – Summary
• 4 – Information
• 5 – Detail
• 6 – Debug
-hor -? - Help
LimitSet Refresh
Execution Statement:
Operating System Name *
Start Statement: OpMgmt.LimitSetLimitsToRelToPHD
No Parameters
MSGLOGSERVER
Execution Statement:
Operating System Name:*
Start Statement: MSGLOGSERVER
No Parameters
Operations Monitoring
Execution Statement:
Operating System Name:NT
Start Statement: op_mon
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL the
Scheduler defaults to
the account and
database that it
connects with.
PA Auto Reprocess
Execution Statement:
Operating System Name: NT
Start Statement: auto_reprocess
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL the
Scheduler defaults to the
account and database
that it connects with.
• -d1 – Level 1
diagnostics
• -d2 – Level 2
diagnostics (all
diagnostics)
• -hor -? - Help
PA Nightly Processing
Execution Statement:
Operating System Name: NT
Start Statement: ip_nightly.cmd
Parameter Default Seq Parameter Value Description
Value Required Required
CMDLINE_SWITCHES 1 Yes Yes The parameter value must
have the following five
arguments typed on one
single line, separated by
spaces, and not enclosed
within quotes:
AUTO_PROCESS
LOT_TRACKING
NO
NO
user / password@
database
PHD_TO_REL
Execution Statement:
Operating System Name: NT
Start Statement: phd2rel
Parameter Default Seq Parameter Value Description
Value Required Required
INI_FILE 1 Yes Yes Name of ini file containing
configuration information
for the process.
Execution Statement:
Operating System Name: *
Start Statement: ProdMoveIfc.ProcessInterfaceData
Parameter Default Seq Parameter Value Description
Value Required Required
MSGLOG_DIR No No Defines the directory
name where the file
containing message log
data is located.
a – Append messages to
the existing file.
Execution Statement:
Operating System Name: NT
Start Statement: sched
Parameter Default Seq Parameter Value Description
Value Required Required
EXEC_FREQ_HRS 1 Yes Yes Execution frequency of
the process in hours. It
must match the
configured execution
frequency the scheduler
uses.
Production Schedule
Execution Statement:
Operating System Name: NT
Start Statement: process_prod_sched
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connection
string. If left NULL the
Scheduler defaults to the
account and database
that it connects with.
Execution Statement:
Operating System Name: *
Start Statement: DataCleanUp.PurgeBackgroundProcessStatus
Parameter Default Seq Parameter Value Description
Value Required Required
KEEP_DAYS Yes Yes The number of days of
background process status
messages to keep in the
database. All records older
than the current time minus
the KEEP_DAYS are
deleted.
Execution Statement:
Operating System Name: *
Start Statement: DataCleanUp.PurgeInterfaceData
Parameter Default Seq Parameter Value Description
Value Required Required
KEEP_DAYS Yes Yes The number of days
of interface data to
keep in the
database. All records
older than the
current time minus
the KEEP_DAYS are
deleted.
Execution Statement:
Operating System Name: *
Start Statement: DataCleanUp.PurgeLIMSRedoLog
Parameter Default Seq Parameter Value Description
Value Required Required
KEEP_DAYS Yes Yes The number of days of LIMS
redo log data to keep in the
database. All records older
than the current time minus
the KEEP_DAYS are
deleted.
Execution Statement:
Operating System Name: *
Start Statement: DataCleanUp.PurgeMessageLogData
Parameter Default Seq Parameter Value Description
Value Required Required
KEEP_DAYS Yes Yes The number of days of
message log data to
keep in the database. All
records older than the
current time minus the
KEEP_DAYS are
deleted.
Recipe Download
Execution Statement:
Operating System Name: NT
Start Statement: Recipe_Download
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_S 1 Yes No Database connections string.
TRING If left NULL the Scheduler
defaults to the account and
database that it connects
with.
The following command line switches for Recipe Download can be used in lieu of the
parameters described above:
-ph PHD_Host
-rqt Request_Flag_Tag
-rnt Recipe_Name_Tag
-est Error_Status_Tag
-emt Error_Message_Tag
-ett Error_TagName_Tag
-pn Process_Name
-eq Equipment_Name
Recipe Synchronization
Execution Statement:
Operating System Name: NT
Start Statement: recipe_sync
Parameter Default Seq Parameter Value Description
Value Required Required
CMDLINE_SWITCHES 1 Yes Yes Mandatory switches
–src user /pswd @
source_database
Optional switch
-debug
REL_TO_PHD
Execution Statement:
Operating System Name: NT
Start Statement: pipetophd
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL the
Scheduler defaults to the
account and database that it
connects with.
Execution Statement:
Operating System Name: NT (even if configuring for VMS!)
Start Statement: distribtophd
Parameter Default Seq Parameter Value Description
Value Required Required
CMDLINE_SWITCHES 1 Yes Yes Mandatory switches -cs user /
pswd @ database (database
connect string) / and
@database are required
Sample Scheduling
Execution Statement:
Operating System Name: NT
Start Statement: sched
Parameter Default Seq Parameter Value Description
Value Required Required
EXEC_FREQ_HRS 1 Yes Yes Execution frequency
of the process in
hours. It must match
the configured
execution frequency
that the scheduler
uses.
Tag Synchronization
Execution Statement:
Operating System Name: NT
Start Statement: tagsynx
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.
• 0 – Errors
• 1 – Summary
• 2 – Information
(default)
• 3 – Detailed logging
• 4 – Debug level
(content varies)
Tank Composition
Execution Statement:
Operating System Name: NT
Start Statement: tank_comp
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to the
account and database
that it connects with.
Event-Driven Applications
Event-Driven Scheduler
The application scheduler must subscribe to events to run applications when events
occur. Pending events are created by TotalPlant Information based on the event
subscription data when events are logged by the event monitoring application. The
application server checks for any pending events in the queue every minute. If it finds
an event and if that event is configured to run a process, the application server sets
the parameters of that process to the information found in the event before launching
the process. The process must be configured as an event-driven process, by setting its
execution type to E in the Background Processes form. The parameters that are set
include:
Parameter Value
Once the parameters are set, the application server schedules the process to run
immediately. If the application server is busy handling other processes, it schedules
this event-driven process to run at the earliest time possible, after it finishes the
managing of the other currently active processes.
The four parameters above are set without any sequence number, and therefore are
not passed to the process as command line arguments. The event-driven background
application extracts them from the database, and translates them to any meaningful
variables internally.
The pending event in the queue is then removed, whether it is configured to run a
process or not.
A background process subscribing to an event can be notified when the event starts
or ends, or both. The notification mechanism is via a pending event, that is, a record
for the subscribing background process is inserted into the IP_EVNT_PENDING
table whenever the Event Log data for the event it is subscribing to changes. This
entry contains the following information:
IP_EVNT_PENDING Table
Entry Description
The subscribing background process periodically scans the pending event table for its
notifications, and purges the event pending record once it performs its task and no
longer requires the record.
For Example:
1. Event Subscription:
The Application Scheduler subscribes to the start of the event ANEVENT.
Background Process Event Name Event Status
2. Pending Event:
ID_NO 1
PROCESS_NAME APPLICATION SCHEDULER
EVNT_NAME ANEVENT
VALUE 1
START_DT_TM 1999/03/31 10:00
END_DT_TM null
INSERT_DT_TM 1999//03/31 10:00
3. Processing on Event:
Application Scheduler examines the Pending Event table for records having
PROCESS_NAME of APPLICATION SCHEDULER. When this record is
found, the Application Scheduler runs the background process specified on the
event log configuration record for ANEVENT, and then deletes this pending
event record.
For example, if a new package called TEST_PKG inserts into a table called
TEST_TABLE, you need to complete the following in SQL*PLUS:
GRANT EXECUTE ON TEST_PKG TO PUBLIC.
CREATE PUBLIC SYNONYM TEST_PKG FOR TOTALPLANT.TEST_PKG
Use TPI Admin to configure security on the TEST_TABLE for a role used by
OPS$TOTALPLANT.
batch creation
Batch Tracking background processes 20
Index batch remaining
Batch Tracking background processes 22
Batch Tracking
background processes 19
Batch Creation 20
A Batch Remaining 22
Alarm Monitoring Lineups 19
background processes 27 Production Events 20
background processes parameters 50 Update Batch Procesing Equipment Times 22
Application Management – Windows Report Blend Management Interface
Scheduling background processes parameters 52
background processes 45 Blend Management PHD Characteristics
Application Server background processes parameters 53
background processes 47–78 BM Interface File Loader
Event Driven applications 76–78 background processes parameters 54
Package and Store procedure 78 BT Batch Tracking
parameters 47–75 background processes parameters 55
required background processes 47
Auto Instruction Create C
background processes parameters 50
configuration
auto processing
Recipe Management background processes 32
Operations Monitoring - Shift Summary
robust PHD data distribution 25
background processes 43
configuring tag values to retrieve from PHD
B Operations Monitoring - Shift Summary
background processes 43
Background Processing Cutoff Inventory Product Update
Application Management – Windows Report Production Management - Production
Scheduling 45 Accounting/Costing 14
Application Server 47–78
introducing 7 D
Operations Management – Alarm and Event
database synchronization
Monitoring 27–28
background processes 25
Operations Monitoring – Shift Summary 43–44
details, adding
Plant Information Management 25–26
Recipe Management background processes 34
Production Management 19–24
Production Run Planning 29
E
Quality Management - LIMS QM 9–10
Quality Management – Production Management Event Driven applications
– Production Accounting/Costing 11–18 Event Driven Scheduler 76
Recipe Management 31–41 Event Subscription Details 77
G messaging
recipe synchronization 33
Generate Cutoff Inventories
robust PHD data distribution 25
Production Management - Production
MSGLOGSERVER
Accounting/Costing 13
background processes parameters 60
Generate Material Transfer
Production Management - Production
Accounting/Costing 14
O
Generate Static Routes operating instruction scheduling
Production Management - Production Operations Monitoring - Shift Summary
Accounting/Costing 14 background processes 44
Get Equipment for Balance Group Operations Management – Alarm and Event
Production Management - Production Monitoring
Accounting/Costing 11 background processes 27–28
Operations Monitoring
I background processes parameters 60
Instruction Scheduling Operations Monitoring - Shift Summary
background processes parameters 57 auto processing 43
Interface Data File Loader configuring tag values to retrieve from PHD 43
background processes parameters 58 operating instruction scheduling 44
Intermediate 19 overview 44
introducing Background Processing 7 Operations Monitoring – Shift Summary
background processes 43–44
R sequence of events
Recipe Management background processes 38
Recipe Download
robust PHD data distribution 26
background processes parameters 68
Recipe Management
T
background processes 31–41
Configuration 32 Tag Synchronization
details 34 background processes parameters 74
Formulation Details 36 Tank Composition
Recipe Synchronization 31 background processes 24
sequence of events 38 background processes parameters 75
recipe synchronization Transfer Resolution
messaging 33 Production Management - Production
Accounting/Costing 15
Recipe Management background processes 31
Recipe Synchronization
U
background processes parameters 70
REL_TO_PHD update batch processing equipment times
background processes parameters 71 Batch Tracking background processes 22
Relational to PHD Update Resolved Quantities
background processes 25 Production Management - Production
Accounting/Costing 17
Re-Send Resolved Quantities to PHD after
Allocation
Production Management - Production V
Accounting/Costing 18 VMS Sample Scheduling
Re-Update Resolved Quantities after Allocation creating samples in LIMS QM 9
Production Management - Production
Accounting/Costing 18 W
robust PHD data distribution
background processes 25 Windows Report Scheduling
configuration 25 Application Management background processes
45
messaging 25
Windows Sample Scheduling
sequence of events 26
creating samples in LIMS QM 10
Robust PHD Data Distribution
background processes parameters 72
S
Sample 39
Sample Scheduling
background processes parameters 73
Send Resolved Quantities to PHD
Production Management - Production
Accounting/Costing 17