Using Batch Tracker

The BatchTracker object enables the production tracking functionality in the system and links together objects in the I/O Model and the ISA-95 Equipment Model.

The concepts and configuration of the Batch Tracker and related objects are explained in greater detail in other parts of the documentation but this page aims to provide a fully working example of all the objects involved using a simple scenario to explain some of the concepts of batch production and batch tracking.

The example use case chosen is relatively easy to comprehend for everyone. A bread factory represents a scenario everybody can relate to, and baking simple wheat bread, for example, is something everybody can do in their kitchen at home.


The example can be loaded from a Console Display in DataStudio with the following simple Lua code:

In Lua Security Mode Restrictive, for the installation script as well as the actual example to work, additional configuration of Lua permissions is required. See Lua Security for background information and examples.

The code above will create a folder structure "Examples/Bread Factory" underneath the Core object in I/O Model, and it will also create an enterprise structure in the ISA95 Model.

After the initial setup, the simulated bread factory will not be active and its objects in I/O model will appear disabled:

Bread Factory: Fresh Setup

To activate the simulation, enable the "00 MES" object:

Bread Factory: Start the example

The object property of the "00 MES" will then show the status STARTING:

Bread Factory: Start example descriptive status message

In the ISA95 Equipment model, the "Descriptive Status Message" will now indicate that the simulated oven of the bread factory is heating up:

Bread Factory: ISA95 Status Message during startup

Once the oven reaches its operational temperature of 260 degrees Celsius, the remaining I/O model objects of the bread factory will be enabled and bread production will begin.


The bread factory simulation tries to capture the work flow of an actual bread production line, but naturally takes certain liberties to simplify the process to keep it comprehensible for training purposes:

Bread Factory: Production Flow

The bread recipe, and other settings that control the simulation, are represented in the 00 MES object:

Bread Factory: Recipe

The variable MES_TIMESCALE can be used to speed up or slow down the processing speed of the simulated bread factory.

The variable Current Batch Tracker holds an integer value that can be used to select one of the available pre-configured batch trackers. If the value of this variable is changed, the current batch will run to its completion, then the currently running batch tracker will be set to configuration mode and the chosen new batch tracker will enter production mode.

The other variables hold status values of the production line and provide the source for the analog measurements that are being shown in the ISA95 Equipment model.

The mixer in our simulated bread factory has a capacity of 250kg, and the following recipe is used to bake a batch of bread using our simulated production line:

  • 80kg of flour

  • 61.5kg water

  • 4.2kg yeast

  • 1.6kg fat

  • 6.4kg brine (we do not use salt directly, but "salted water" instead)

To make the simulation more interesting, and to actually have a changing resource for each batch that can be tracked, four different brands of flour are being used and the simulation iterates through the available flour brands.

All ingredients are managed by the object 01 Storage Silos and with each new batch the amount of ingredients defined in the recipe is taken out of the simulated silos:

Bread Factory: Storage Silos

The ISA-95 Equipment Model provides an "executive overview" over the status of the simulated bread factory production line. The analog measurements displayed there are being used by the batch trackers to produce Production Batch Records and to keep track of the batches:

Bread Factory: ISA-95 Equipment Model

This example comes with a selection of pre-configured batch trackers to illustrate the use of different conditions to indicate the start and end of a batch and that also collect different data points to add to the respective batch production record:

Bread Factory: Batch Trackers

The collected Batch Production Records (BPR) can be examined using the calendar in DataStudio:

Bread Factory: Calendar and BPR