Part 1 - Batch job example

this article is part of batch job example presented in the next three pages (part 2, part 3, part 4)

Introduction

In this example we will set up a batch job monitoring system using the equipment model approach in Engineering UI. We will create a simple cookie production line and show the whole process from start to finish within the next few parts.

The goal of this tutorial is to build a traceable monitored system, where sensors measure e.g. Raw material quantity, price per ingredient, machinery temperatures, production time and total amounts produced. For this purpose we have created a Cookie production line with four devices: Mixer, dispenser(s), oven and packager.


Our example Cookie Production Line

Example of our Chocolate Cookie production line


Manufacturing Process

In our example one cookie production batch takes 36 minutes to finish and produces 72 bags of cookies, each bag containing 36 cookies. The dispensers measure and dose the raw materials to mixer where our cookie dough is mixed. After this, the ready-made dough will be dosed to cooking trays and moved to the oven to bake. From there the baked cookies are transferred to the packaging machine and packed into sales batches. Each sales batch has a unique batch Id and pallet Id.

Separating batches

We can separate each sales batch by enabling "batch job" in our application calculation. This allows us to monitor chosen property value changes. To separate batches, we use a unique cookie batch identifier. History values will be stored for each batch.

Equipment model

Before starting configurations in Engineering UI we plan what kind of Equipment Model we need. First, we will create one Equipment class called Production Line 1 (we use numbering here for multiple production line purposes), which will be our base class for this example. For this we will create one instance called Chocolate Cookie Line 1. Then we create four other classes called Mixer, Oven, Packager and Dispenser. These are not directly derived from our Production Line 1 and will not have any shared properties. Mixer, Oven and Packager will each have one instance with same name as the class is.

To tie our classes together, we will create Mixer, Oven and Packager as reference properties to our Production Line 1 class. For Reference Target of each property we will mark the path of each class name (this will be shown in the tables below). By doing this, we are able to access the instances and properties of each model through our base model instance Chocolate Cookie Line 1.

Dispenser is an abstract class responsible for measuring raw material amounts to Mixer. Our Dispenser will have six instances matching our raw material and dough dispensers and these will be accessed through Mixer class. This is to tie together our Mixer and Dispensers within.

All Equipment model definitions and properties are shown in the tables below.

Model Hierarchy

Production Line 1
├── Chocolate Cookie Line 1
│   ├── Mixer
│   ├── Oven
│   └── Packager
└── Dispenser

Model definitions

NameAbstractClass name
Production Line 1YesPath_Cookie.ProductionLine1
MixerNoPath_Cookie.Mixer
OvenNoPath_Cookie.Oven
PackagerNoPath_Cookie.Packager
DispenserYesPath_Cookie.Dispenser

Model properties

After defining the model hierarchy, we will create properties and define their attributes.

Production Line 1

PropertyData typeUnitHistorizedDescriptionReference Target
Cookie batch idstringYesUnique identifier for each batch
MixerGUIDNoDough mixerClass:Path_Cookie.Mixer
OvenGUIDNoBaking ovenClass:Path_Cookie.Oven
PackagerGUIDNoCookie sales batch packagerClass:Path_Cookie.Packager
Production statebooleanYes0 = off, 1 = on
Production timeinteger (32bit)MINYesTime per one batch production in minutes

Mixer

PropertyData typeUnitHistorizedDescriptionReference Target
Average temperatureFloating point value (64bit)celsiusYesCalculated average temperature during batch production time
ButterGUID for Dispenser instanceNoCookie raw materialClass:Path_Cookie.Dispenser
ChocolateGUID for Dispenser instanceNoCookie raw materialClass:Path_Cookie.Dispenser
DoughGUID for Dispenser instanceNoReady-made cookie doughClass:Path_Cookie.Dispenser
EggGUID for Dispenser instanceNoCookie raw materialClass:Path_Cookie.Dispenser
FlourGUID for Dispenser instanceNoCookie raw materialClass:Path_Cookie.Dispenser
Mixing StateFloating point value (64bit)YesEnum, 1 = on, 2 = off
SugarGUID for Dispenser instanceNoCookie raw materialClass:Path_Cookie.Dispenser
TemperatureFloating point value (64bit)celsiusYesRecorded temperature and possible changes during batch production

Dispenser

PropertyData typeUnitHistorizedDescription
AmountFloating point value (64bit)kgYesAmount of material used
Amount totalFloating point value (64bit)total kg/batchYesTotal amount of material used in one batch
MaterialInteger (32bit)Yes1=butter/2=sugar/3=egg/4=flour/5=chocolate/6=dough
Material idStringYesUnique per batch identifier for each material
PriceFloating point value (64bit)EUR/batchYesPrice per material amount used
Price totalFloating point value (64bit)EUR/batchYesTotal price per material used in one batch

Oven

PropertyData typeUnitHistorizedDescription
Cooking timeFloating point value (64bit)SECYesCooking time in the oven
TemperatureFloating point value (64bit)celsiusYesRecorded temperature and possible changes during batch production

Packager

PropertyData typeUnitHistorizedDescription
Average packager temperatureFloating point value (64bit)celsiusYesCalculated average temperature during batch production time
Bag numberInteger(32bit)YesBag number counter for packing bags in pallet
Cookies in bagInteger(32bit)YesCounter for packing cookies in bags
Packager temperatureFloating point value (64bit)celsiusYesRecorded temperature and possible changes during batch production
Pallet idInteger(32bit)YesUnique per batch identifier for each pallet

Equipment instances

Instance hierarchy

Demo Factory
└── Chocolate Cookie Line 1
    ├── Mixer
    │   ├── Butter
    │   ├── Sugar
    │   ├── Egg
    │   ├── Flour
    │   ├── Chocolate
    │   └── Dough
    ├── Oven
    └── Packager
 

As the instance hierarchy shows, raw materials are Dispenser instances that are being derived to Mixer. The properties of these instances may be accessed through Mixer path. See table below.

Instance paths

NameFull path
Chocolate Cookie Line 1DemoFactory.Chocolate Cookie Line 1
MixerDemoFactory.Chocolate Cookie Line 1.Mixer
ButterDemoFactory.Chocolate Cookie Line 1.Mixer.Butter
SugarDemoFactory.Chocolate Cookie Line 1.Mixer.Sugar
EggDemoFactory.Chocolate Cookie Line 1.Mixer.Egg
FlourDemoFactory.Chocolate Cookie Line 1.Mixer.Flour
ChocolateDemoFactory.Chocolate Cookie Line 1.Mixer.Chocolate
DoughDemoFactory.Chocolate Cookie Line 1.Mixer.Dough
OvenDemoFactory.Chocolate Cookie Line 1.Oven
PackagerDemoFactory.Chocolate Cookie Line 1.Packager

Property values

Below is a list of the property values for all the equipment instances. Historized properties with changing values are marked as "-".

Chocolate Cookie Line 1

PropertyValue
Cookie batch id-
Production state-
Production timeruns from 0 to 36
MixerDemoFactory.ChocolateCookieLine1.Mixer
OvenDemoFactory.ChocolateCookieLine1.Oven
PackagerDemoFactory.ChocolateCookieLine1.Packager

Butter

PropertyValue
Amount11.4
Amount total11.4
Material1
Material id-
Price22.2
Price total22.2

Sugar

PropertyValue
Amount10.2
Amount total10.2
Material2
Material id-
Price7.2
Price total7.2

Egg

PropertyValue
Amount7.8
Amount total7.8
Material3
Material id-
Price21.6
Price total21.6

Flour

PropertyValue
Amount21
Amount total21
Material4
Material id-
Price2.4
Price total2.4

Chocolate

PropertyValue
Amount22.8
Amount total22.8
Material5
Material id-
Price34.8
Price total34.8

Dough

PropertyValue
Amount73.2
Amount total73.2
Material6
Material id-
Price87.6
Price total87.6

Mixer

PropertyValue
Average temperature-
Temperature-
Mixing state-

Oven

PropertyValue
Cooking time480
Temperature100 - 200

Packager

PropertyValue
Average temperature-
Temperature-
Bag number-
Cookies in bag-
Pallet id-

What’s Next

Creating an Equipment model with Engineering UI