Configure Model 5013 for Batch Analysis
Model 5013 is used to extract the data from your batch journal table (sometimes known as the Batchhis table) and write them to the Event_Transactions table. This model needs to be configured on the production unit that you are using as your batching unit.
If you are not using Proficy Batch Execution or RSBatch, you must find another method for populating the Event_Transactions table, such as creating your own custom stored procedure and configuring a Model 602 to call your custom stored procedure. For more information on configuring a Model 602, see the topic, Generic Model 602-Interval Triggered.
Using RSBatch
If you are using RSBatch, Model 5013 will fire on the interval specified when configuring the model and look to see if there are any unprocessed batches in the Local_BatchComplete table. If it identifies unprocessed batches, it will then select all the records from the Batchhis table, perform the required data mapping, insert the records into the Event_Transactions table, and mark the batch as processed in the Local_BatchComplete table.
-
The RSBatch interface executes at the 'End of Batch'; it does not process batch records real-time.
-
Model 5013 will process the maximum number of batches per cycle specified in the (rsBatch) Max Batches to Process per run option (the default is 1), ordered by lcltime.
Using Proficy Batch Execution
For Proficy Batch Execution, Model 5013 will fire at the specified interval and attempt to process any unprocessed records from the Batch Analysis table, based on the specified parameters.
To configure Model 5013
Plant Applications Administrator > Plant Model > Department > Production Line > Production Unit
-
Ensure you have configured Model 118. For more information, see the topic Configure Model 118 for Batch Analysis.
-
Right-click the production unit you are using as your batching unit and click Configure Events on <production unit>. The Event Configuration wizard appears.
-
On the Configured Models tab, select Import from the Model Type list and click Add New Model. The General tabbed page is added and becomes active.
-
Click More Models. The Search dialog box appears.
-
Under Model Number, select model 5013 and click OK.
-
On the General tab, edit the following options:
-
optional: In the Exclusions box, type the values this model is to ignore and not use to trigger the model. Use a comma to separate values.
-
optional: In the Extended Information box, type additional information that may be useful. This is not used on any reports or displays.
-
optional: In the Maximum Run Time (Seconds) box, type the number of seconds you want the model to run. The default is 0 (zero), which means the model will not time out. Typically, you will want to limit the run time of the model only if troubleshooting the model (for example, one of the stored procedures is in an infinite loop).
-
optional: Type the group number in the Model Processing Group box. The Model Processing Group number can be up to six digits.
-
The Model Processing Group field is not used for this model.
-
In the TINT: Interval (Minutes) box, type the timing interval, in minutes, between calls.
-
In the spName box, select the correct stored procedure (spS88_iBatchReader or spS88_RSBatch6Reader).
-
In the Delay(Seconds) box, type the number of seconds to add to the timestamp. Typically, this is used to adjust for data that falls outside the sampling window because Plant Applications cannot recognize millisecond resolution.
IMPORTANT: Do not use this field unless you have advanced knowledge of SQL and Plant Applications.
-
The three Reserved fields are reserved for future use.
-
Proficy Batch Execution only — In the (iBatch) Field for Batch Instance box, type a unique ID to use for creating the batch name. If used, the batch name would be batch name | batch instance. This can be left blank.
-
Proficy Batch Execution only — In the (iBatch) Field for Batch Name box, type the batch ID or a unique ID, which is used for building the batch name. The batch name will be batch name | batch instance (if the batch Instance is specified).
-
Proficy Batch Execution only — Select the (iBatch) Ignore Ready and Idle Status option to ignore records that have a StateValue of 'Ready' or 'Idle'. These records will not be inserted into the Event_Transactions table. Selecting this option will prevent Ready and Idle records that occur after the batch complete state from giving a false end-of-batch time.
-
Proficy Batch Execution only — In the (iBatch) Max records to process per run box, type the maximum number of records to process per stored procedure call. The default is 5000 records per stored procedure call.
-
Proficy Batch Execution only — In the (iBatch) Unique Field Name box, type the name for the column that contains the record order for the batch. The default is "Sequence".
-
RSBatch only — In the (rsBatch) Filter box, specify a filter that will remove records that meet the criteria prior to insertion into the Event_Transactions table. It must reference the field names from the Event_Transactions table. This is an example of a filter:
(ParameterAttributeValue = '-9999' OR RecipeString LIKE '%$NULL%' OR ((ParameterAttributeValue IS NULL OR ParameterAttributeValue = '') AND EventName IN ('Recipe Header', 'Report', 'Scale Factor', 'Param Download Verified', 'Recipe Value')))
-
RSBatch only — In the (rsBatch) Max Batches to Process per run box, type the number of batches to process. Previously, processing was done by number of records.
-
RSBatch only — In the (rsBatch) Table Name for Completed Batches box, type the name of the Local_BatchComplete table that is created on the batch history database. If you are running multiple interfaces from the same Plant Applications server, you must have multiple, uniquely named Local_BatchComplete tables.
-
In the Batch Database Name box, type the name of the batch history database. If the database is on another server (a linked server), use the format servername.databasename.
-
In the Batch Database Owner box, type the name of the SQL database owner of the batch history database. The default owner is 'dbo'.
-
In the Batch Table Name box, do one of the following:
-
For RSBatch, type the name of the table that contains the batch journal records.
-
For Proficy Batch Execution, you must use "BatchAnalysis".
-
In the Decimal Separator on Batches box, type either a comma or period. If the source batch journal data is stored with a comma, it will be converted to a decimal before insertion into the Event_Transactions table.
-
In the Group Separator on Batches box, type the group separator that will be replaced with a comma prior to insertion into the Event_Transactions table.
-
In the Product Code Parameter Name box, type the name in the Descript field that contains the product for the batch
-
Select the Recipe Value in ParameterReport option to convert the event types of 'Recipe Value' to ParameterReport Eventtypes in Event Transactions. They will be treated as variable data instead of specifications.
-
Select the Use Batch Instance option to use the Batch Instance field when building the Batchname with the format of BatchName|BatchInstance.
-
Click
Save.
See Also