Download PHS Color Batch Simulator
Download the simulator and the TIA Portal V20 control project with SCL logic.
TIA Portal V20 project
This article presents PHS Color Batch Simulator, a pigment dosing simulation model controlled through OPC UA. The simulator acts as a virtual plant: it generates orders, calculates weights, mixes colors and exposes the required variables so an external controller can govern the process.
In this example the control is performed by a PLC programmed in TIA Portal V20. The downloadable project contains a control program generated for the process, developed in SCL, and prepared to read states, write commands and govern the batch through OPC UA.
The logic takes material tails, simulation times and the required weight corrections into account. The finer the dosing needs to be, the more parameters must be considered: early cut-off values, material in flight, tolerances and final batch validation.
The batch is only considered valid if it ends within the configured parameters. It is a simple way to practice a very common industrial idea: moving valves is not enough; the system must produce a concrete amount, with a concrete recipe and with verifiable quality.
Demo of the simulator creating a production order, dosing pigments, mixing and sending the batch to the bagging station.
What it is and what you practice
The simulator represents a small batch manufacturing installation: several pigment silos, a transport line, a weighing hopper, a mixer and a bagging station. The plant can work locally or be governed by the PLC in production mode.
The useful part of the example is the complete cycle: generate an order, receive the recipe, dose the components, control the weight, monitor the achieved color, mix for the configured time and discharge the final product.
The application creates an order with a target weight and pigment proportions.
The PLC must control material entry while considering tails and tolerances.
The final product is correct only if weight and composition remain within range.
Production order and recipe
To start a simulation, press Enter Production. At that moment the simulator creates a new order with a random recipe that the PLC must fulfill.
Production start: the simulator creates a new order for the PLC sequence to execute.
The order contains the target weight and the desired mixture. From those values, the control program must decide which silos are used and how much material must be dosed from each pigment.
Recipe generated by the simulator with target weight, color composition and tolerances.
The next step is to check that the information reaches the TIA Portal project correctly. The PLC receives the order data, the requested weights and the values required to evaluate whether the batch remains within parameters.
TIA Portal check of the data received from the simulator.
PLC control and HMI Web Server
After the order is received, the system waits for dosing to be performed so the requested batch can be produced with the expected mixture and tolerance. In this example a PLC sequence has been created and operated from an HMI hosted in the Web Server.
Project HMI: the production sequence is started and monitored from here.
Production sequence
With the recipe loaded, the sequence starts. First, pneumatic transport is prepared. Then the required components are dosed until the target weight of each recipe part is reached.
Transport air
The first step is to introduce air. The line must reach the required pressure or speed before pigment starts moving, because if dosing begins too early the batch will not behave as expected.
Sequence start from the HMI.
Pneumatic transport is activated before material dosing starts.
Component dosing
Once the air conditions are reached, component dosing begins. The PLC acts on the corresponding silo, material enters the line and the simulator calculates the amount that is in flight toward the weighing hopper.
First component in dosing: the real weight must approach the value requested by the recipe.
During dosing, the color of the mixture changes in real time. The simulator compares the target color with the achieved color and makes it easy to see whether the batch is getting closer to the requested recipe.
Visual evolution of the color while material enters the batch.
The weight evolution of the component and its tolerances are also visible. This is important: if a valve closes too late, the material tail can make the component overshoot; if it closes too early, the batch will be short.
Monitoring the dosed weight and acceptable margins.
When one component finishes, the sequence moves to the next one. The same logic repeats: select silo, open dosing, compensate material in flight and validate the weight contribution.
The next component enters the mixture to complete the recipe.
As the sequence advances, the achieved color approaches the target color. This comparison makes the exercise more visual than a simple table of weights.
The mixture approaches the target color defined by the order.
Mixing and discharge
Once the weighing hopper is filled, the material is transferred to the mixer. The batch remains there for a defined time before being discharged, so the sequence must also manage waiting times and intermediate states.
Transfer to the mixer after dosing is complete.
Mixing time before releasing the product to the final station.
When mixing is complete, the product is discharged to the final container. Clicking the batch shows its characteristics: weight, mixing time, homogeneity and bag composition.
Final batch detail at the bagging station.
Final batch information
All batch information remains available in the PLC: weights, composition, sequence states and validation. This makes the exercise useful for practicing diagnostics, alarms, historical data or production reports.
Batch data accessible from the PLC project.
With the batch finished, the simulation is ready for another order. If you want to manufacture a new batch, press Next and the simulator will generate another order with a different recipe.
Finished batch: the installation is ready for a new production order.
In short, PHS Color Batch Simulator turns a dosing sequence into a complete automation exercise: recipe, OPC UA control, times, material tails, tolerances, mixing and final validation. It is especially useful for testing logic before moving to a real plant.
Downloads
Download the simulator and the TIA Portal V20 project used for control. The PLC program is generated to control the simulator installation through OPC UA and is developed in SCL.