Monitor and control a brewing process.

How-to ExamplesIndustry → BottlingLine ML



Download the solution: BottlingLine ML Demo.dbsln

This guide demonstrates how to create a complete IoT solution that collects data from the field, publishes it to an MQTT broker, historizes the data, applies machine learning models, and displays real-time values.

System Overview: 

  • Collects data from field devices (simulated)

  • Publishes data to MQTT broker

  • Historizes data to SQLite database

  • Applies machine learning models to monitor anomalies

  • Displays real-time values in customizable dashboards



Technical Information

New Solution

  1. In Solution Center, click to create a new solution

  2. Select Windows platform

  3. Choose Portable layout (allows visualization across different devices)

  4. Enter a solution name

  5. Click Create Solution

Demo Tags

  1. Use the GPT Frameworks AI assistant to generate tags for a demo

  2. Copy the generated table

  3. Navigate to Unified Namespace → Tags

  4. Paste the tags into the namespace

  5. Copy these tags for use in the next steps

Value Simulator for Data Collection

  1. Navigate to Devices → Protocols

  2. Select “Value Simulator” protocol and “New Channel…”

  3. In Devices → Points, Paste the tags copied from Step 2

  4. The Value Simulator will now generate random values for these tags

Note: The Value Simulator is used for testing purposes to generate field data.

MQTT Publishing

  1. Navigate to Devices → Protocols

  2. Select “MQTT” protocol and “New Channel…”

  3. Select the MQTT channel and create a new node

  4. Configure the Primary Station:

    • Define broker access (e.g., HiveMQ broker)

    • Test the connection to verify it's working

  5. Navigate to Points under MQTT

  6. Select the MQTT channel created

  7. Insert rows for all tags

  8. Change all tags to Write mode (for publishing to broker)

  9. Organize by node if desired

Note: For the MQTT, when no address is defined, the system uses the tag name as the MQTT topic.

 Data Historization

  1. Navigate to Historian module

  2. Right-click and select Insert Rows

  3. Paste the tags copied earlier

  4. Data will automatically be published to Table1 (default SQLite database)

Machine Learning Intelligence

  1. Navigate to Scripts → Classes

  2. Click the New button

  3. Select Import code from Library

  4. Choose AnomalyML from the library

  5. Click OK to open the code

  6. Make any minor edit to the code and save it

  7. Navigate to Scripts → Expressions

  8. Create a new expression to monitor specific tags:

Expression Configuration:

ObjectName

Expression

Execution


Script.Class.MachineLearning.Check(<Tag>)

OnChange

Where:

  • <Tag>: The tag you want to monitor with machine learning

 Display Dashboard

  1. Navigate to Displays → Home Display

  2. Use the tree view in Drag Tags to Display to drag and drop tags onto the display

  3. Save the display

Complete System

  1. Click Runtime → Startup → Run Startup to start the runtime

  2. Observe real-time values changing in the displays

  3. Test different layouts:

    • Desktop Layout: Full desktop view

    • Mobile Layout: Optimized for mobile devices (includes scrollbar for multiple objects)

    • Pad Layout: Tablet-optimized view



In this section...