PIBatch Search Time
- Last UpdatedOct 04, 2024
- 2 minute read
- PI System
- PI Server 2023
- PI Server
The PIBatch Search Time is the time into the past and future (during recovery) from the unit batch start time that the interface searches the PI Batch Database for PIBatches when a PIUnitBatch starts.
If there is a value for the PIBatch Index point at the PIUnitBatch start time (plus evaluation delay), then the interface will first search the PI Batch Database for a PIBatch with the PIBatch name same as the PIBatch Index point value, PIBatch product name and PIBatch recipe name within the time period (PIUnitBatch Start Time + Evaluation Delay – PIBatch Search Time) and (PIUnitBatch start time + Evaluation Delay + PIBatch Search Time).
If a PIBatch with the search criteria is found in the PI Batch Database, then the PIUnitBatch will be added to the PIUnitBatches collection in that PIBatch or else a new PIBatch will be created. If the search results in more than one PIBatch, then the following rulesare used to select the PIBatch.
-
If there is only one running PIBatch in the search period, then that PIBatch is selected irrespective of the start time of the PIBatch.
-
If there is more than one running PIBatch, then the one that has the start time between (PIUnitbatch start time + Evaluation delay - PIBatchSearchTime) and (PIUnitbatch start time + Evaluation delay + PIBatchSearchTime) is selected. If there is more than one running PIBatch in this range, then the one with the latest start time is selected.
-
If there is no running PIBatch but the search results in PIBatches, then the one that has start time between (PIUnitbatch start time + Evaluation delay - PIBatchSearchTime) and (PIUnitbatch start time + Evaluation delay + PIBatchSearchTime) is selected. If there is more than one PIBatch with start time in this range, the one with the latest start time is selected.
-
If there is no running PIBatch but the search results in PIBatches and there is no PIBatch that has start time between (PIUnitbatch start time + Evaluation delay - PIBatchSearchTime) and (PIUnitbatch start time + Evaluation delay + PIBatchSearchTime) then the one that has the latest start time is selected.
-
If no PIBatch is found with the search criteria, then a new PIBatch is added.
The PIBatch Search Time can be seen as the approximate duration of the PIBatch to which the PIUnitBatches in this PIUnit belong. The default value is 4 hrs. It is recommended that this value be slightly greater than one batch duration and less than twice the duration of a typical batch. If the search time is large and if the PIBatch IDs are not unique, then there is a possibility of having multiple results during the search and the PIUnitBatch may not end up in the right PIBatch.