user-manual

User Manual

Version 1.4.0

Last updated: November 11, 2026

MaConSim GmbH


Table of Contents

  1. Introduction
  2. System Requirements
  3. Installation
  4. License Activation
  5. Login and User Management
  6. Plant Management
  7. Create Resources
  8. Create References
  9. Advanced Database Features
  10. Production Operator Dashboard
  11. Database Viewer
  12. Event Logs
  13. Connectivity
  14. Data Source Configuration
  15. License Plan Feature Matrix
  16. REST API
  17. Updating MaConSim
  18. Troubleshooting
  19. Help and Support

1. Introduction

MaConSim (Machine Connectivity Simulator) is a desktop application for manufacturing plants. It lets you model your production environment, configure realistic machine simulations, manage production orders, and connect to external automation systems — all from a single interface.

Whether you are evaluating a new production line before it goes live, training operators on industrial automation workflows, or demonstrating factory automation to stakeholders, MaConSim lets you build a complete simulation without touching your real production systems.

1.1 What You Can Do with MaConSim

  • Model your plant structure: Define plants, machines, and all associated resources to mirror your real factory layout.
  • Simulate machine behavior: Configure production speed (takt time), alert / nonconformance / maintenance probabilities per machine connection, scrap through NC codes with a scrap disposition, and tool consumption per machine.
  • Manage production orders: Create orders with target quantities, break them into individual Shop Floor Control (SFC) units, and queue them to machines.
  • Monitor production live: The Production Operator Dashboard shows real-time progress, machine status, active SFCs, and recent events for all running orders.
  • Log events automatically: Alert occurrences, nonconformance codes, and order state transitions are recorded and available in the Event Logs.
  • Connect to real systems: Expose simulation data to SCADA/DCS software via the built-in OPC UA server, or publish it to IoT platforms via MQTT.
  • Integrate programmatically: Access all MaConSim functionality via REST API for test automation, CI/CD pipelines, or custom integrations with MES, SCADA, or other IoT systems.
  • Back up and transfer configurations: Export a complete plant — including all machines, scenarios, orders, and connectivity settings — as a single portable YAML file.

1.2 Key Concepts

If you are new to industrial automation and control systems (e.g., MES, SCADA, DCS), the following table explains the core terms used throughout this manual:

Concept Description
Plant The top-level container representing a factory or site. All resources and settings belong to a specific plant.
Machine A physical production asset within a plant (e.g. a CNC machine, press, or assembly station).
Scenario A named set of simulation parameters — takt time, units per takt, scrap handling, etc. — that defines a machine’s simulated behavior. A machine can have multiple scenarios assigned; you select which one is active at runtime.
Order A production order with a target quantity and unit of measure.
SFC A Shop Floor Control unit — an individual work item within an order, representing a specific lot or serial unit that travels through a machine.
NC Code A nonconformance code identifying a specific type of quality deviation (e.g. "Dimension out of tolerance"). Occurs on a part during simulation with the probability set on the machine connection; an NC code with a scrap disposition makes that part scrap.
Tool A physical tool used by a machine during production (e.g. a drill bit or cutting insert). Tool usage is tracked per takt when enabled.
Alert A named machine event type triggered during simulation (e.g. "Overtemperature"). Fired automatically based on the configured alert rate.
Data Collection A named measurement channel (e.g. temperature, pressure, cycle time) associated with a machine, published via OPC UA or MQTT.
OPC UA Tree A virtual OPC UA server instance that exposes simulation data to external OPC UA clients.
MQTT Broker A connection to an MQTT broker through which machine data is published as structured messages.

1.3 Typical Workflow

A typical MaConSim setup follows this sequence:

  1. Activate your license (first launch only) — Chapter 4
  2. Create a plant — Section 6.1
  3. Add machines to the plant — Section 7.1
  4. Create simulation scenarios — Section 7.2
  5. Connect scenarios to machines — Section 8.1
  6. Create orders and SFCs — Section 7.4
  7. Queue SFCs — Section 8.2
  8. Start production on the dashboard — Chapter 10

Optionally, enrich the simulation by adding alerts, NC codes, tools, and data collections (Sections 7.5–7.9) and connecting them to machines (Sections 8.3–8.6).

Data is stored locally. MaConSim runs entirely offline. All plant data is stored in a local database on your computer. An internet connection is only required at startup for license validation.


2. System Requirements

Component Requirement
Operating System Windows 10 (64-bit) or newer; macOS 11.0 (Big Sur) or newer (Apple Silicon / ARM64 only); Ubuntu 22.04 or newer (64-bit); Docker (any host OS supporting Docker 24+)
RAM 4 GB minimum, 8 GB recommended
Disk space 50 MB for the application; additional disk space required for plant data (database grows with usage — allow at least 100 MB free)
Display resolution 800 × 600 minimum
Internet connection Required at startup for license validation
Network ports Outbound HTTPS (443) for license validation; REST API: 8080; OPC UA: 4840; MQTT: 1883 (plain) / 8883 (TLS) — all default, configurable

Firewall: If you plan to use the OPC UA server or connect to an external MQTT broker, ensure the relevant ports are allowed through your operating system firewall and any corporate network firewall. See Section 18 (Troubleshooting) for guidance.

Anti-virus / Security software: Some security tools may flag or block MaConSim on first launch. If the application does not start, check whether it has been quarantined and add an exception for the MaConSim installation folder.

Data storage locations:

The database file is created automatically on first launch at the following path for your operating system:

OS Path
Windows C:\Users\{username}\AppData\Roaming\com.maconsim.app\MaConSim.db
macOS ~/Library/Application Support/com.maconsim.app/MaConSim.db
Linux ~/.local/share/com.maconsim.app/MaConSim.db
Docker Data stored in the maconsim-pg-data PostgreSQL volume — no local file.

Custom logo (optional):

If you operate MaConSim for another company, you can show that company’s logo next to the MaConSim logo in the header. Copy a JPEG image named exactly logo.jpeg (lowercase, at most 5 MB) into the same folder as the database file (the folders in the table above). The logo appears the next time the application is opened or the page is reloaded; delete the file to hide it again. Without the file, or if it is not a valid JPEG, the header shows only the MaConSim logo. In Docker the logo is read from /data/logo.jpeg in the backend container (see Section 3.4).

Backup: The database file (desktop) or Docker volume (server) contains all your plant data. Back it up regularly by copying it to a safe location. You can also use the Plant Export feature (Section 6.4) to export individual plants as portable YAML files.


3. Installation

3.1 Windows

  1. Download the installer: maconsim_0.1.0_x64-setup.exe
  2. Double-click the installer to run it.

    Windows SmartScreen: Windows may show a "Windows protected your PC" message for newly published software. Click More info → Run anyway to proceed.

  3. Follow the installation wizard and accept the license agreement.
  4. Choose an installation folder (default: C:\Users\{username}\AppData\Local\MaConSim) and click Install.
  5. Once complete, launch MaConSim from the Start Menu or the desktop shortcut.

Administrator rights: The Windows installer does not require administrator rights. MaConSim installs per-user into C:\Users\{username}\AppData\Local\MaConSim.

3.2 macOS

  1. Download the disk image: maconsim_0.1.0_aarch64.dmg

    Apple Silicon only: The macOS build runs on Apple Silicon (M1 / M2 / M3 and later) only. Intel-based Macs are not supported.

  2. Double-click the .dmg file to mount it.
  3. Drag the MaConSim icon into your Applications folder.
  4. On first launch, macOS Gatekeeper may show a warning that the app is unverified. To open it:
    • Right-click (or Control-click) the MaConSim icon in Applications.
    • Select Open from the context menu.
    • Click Open in the security dialog.
  5. Launch MaConSim from Launchpad or the Applications folder.

No administrator rights required. Dragging the app to the Applications folder does not require elevated privileges. The app runs entirely from that location without any system-level installation.

3.3 Linux

  1. Download the package for your distribution:
    • Debian/Ubuntu: maconsim_0.1.0_amd64.deb
    • Other distributions: maconsim_0.1.0_amd64.AppImage
  2. Debian/Ubuntu — install the package:
    sudo dpkg -i maconsim_0.1.0_amd64.deb
    
  3. AppImage — make it executable and run it:
    chmod +x maconsim_0.1.0_amd64.AppImage
    ./maconsim_0.1.0_amd64.AppImage
    
  4. Launch MaConSim from your application menu or run maconsim in a terminal.

Administrator rights: Installing the .deb package requires sudo. The .AppImage variant does not — it runs directly from any location you have execute permissions on, with no system-wide installation.

3.4 Docker

MaConSim is also available as a Docker-based server deployment. This mode runs the backend and frontend as containers, using a PostgreSQL database. It is suited for headless or server environments, demos, and integration testing — no desktop installation required.

Distribution archive contents:

After downloading, you receive a compressed archive named maconsim-docker.zip.

Inside this archive, you will find one or more versioned Docker bundles (for example docker_v1.0.0.zip).

After extracting the latest versioned bundle, you should have a folder like:

docker_v1.0.0/
├── docker-compose.yml       # Orchestrates all services
├── maconsim-backend.tar     # Pre-built backend image (Rust REST API)
├── maconsim-frontend.tar    # Pre-built frontend image (nginx + React SPA)
├── maconsim-mcp-server.tar  # Pre-built MCP server image (AI agent integration)
└── THIRD_PARTY_LICENSE.txt

Prerequisites:

Tool Minimum version Install
Docker 24+ docs.docker.com
Docker Compose v2 (plugin) bundled with Docker Desktop

Docker Desktop on macOS / Windows already ships with Compose v2. On Linux, install the docker-compose-plugin package via your package manager.

Services:

The stack starts four containers:

Service Container Name Image Host Port Purpose
db maconsim-postgres postgres:17-alpine 5432 PostgreSQL — persistent application database
backend maconsim-backend ghcr.io/maconsim-gmbh/maconsim-backend:vx.x.x 8080 Rust REST API — runs DB migrations on first boot
frontend maconsim-frontend ghcr.io/maconsim-gmbh/maconsim-frontend:vx.x.x 1420 nginx serving the React web UI
mcp-server maconsim-mcp-server ghcr.io/maconsim-gmbh/maconsim-mcp-server:vx.x.x 8081 (localhost only) MCP server — exposes the REST API to AI agents over Streamable HTTP, see Section 16.3

External Client Access Ports

MaConSim exposes the following ports for external system integration:

Port Protocol Purpose
8080 HTTP REST API
4840 OPC UA OPC UA Server
1883 MQTT MQTT Broker (plain)
8883 MQTT/TLS MQTT Broker (TLS)
8081 HTTP MCP server for AI agents — published on 127.0.0.1 only (it has no authentication), see Section 16.3

Custom ports: To change these ports, edit the ports mapping in docker-compose.yml. Update both host and container port numbers.

Steps:

  1. Extract the downloaded archive maconsim-docker.zip.

  2. Open the extracted maconsim-docker folder and extract the latest versioned Docker bundle (for example docker_v1.0.0.zip).

  3. Change the database password in .env: Open .env in a text editor and change the POSTGRES_PASSWORD value to a secure password of your choice:

    POSTGRES_PASSWORD=your_secure_password
    

    Required: The bundled .env file contains a placeholder value (changeme). You must replace it with a strong, unique password for security reasons. The application will refuse to start without a valid POSTGRES_PASSWORD.

  4. Start MaConSim using the provided script for your operating system:

    • Windows: Double-click start.bat or run it from Command Prompt/PowerShell
    • macOS/Linux: Run ./start.sh (ensure it is executable: chmod +x start.sh)

    These scripts automatically load the pre-built Docker images (maconsim-backend.tar, maconsim-frontend.tar and maconsim-mcp-server.tar) and start all services in detached mode.

  5. Open the application in your browser:

URL What you see
http://localhost:1420 MaConSim Web UI
http://localhost:8081/mcp MCP endpoint for AI agents (localhost only) — Section 16.3

Alternative: Manual Startup If you prefer to run the commands manually instead of using the start scripts:

  1. Open a terminal and navigate to the extracted version folder (example path on Windows):

    cd C:\Users\jasmi\Downloads\maconsim-docker\docker_v1.0.0
    
  2. Load the pre-built Docker images:

    docker load -i maconsim-backend.tar
    docker load -i maconsim-frontend.tar
    docker load -i maconsim-mcp-server.tar
    
  3. Start all services:

    docker compose up -d
    
  4. Stop the application:

    # Stop containers — all data is preserved in volumes
    docker compose down
    
    # Stop AND delete all data (full reset)
    docker compose down -v
    

Useful commands:

# Follow live logs from all services
docker compose logs -f

# Follow logs from a specific service
docker compose logs -f backend
docker compose logs -f frontend
docker compose logs -f mcp-server

# Open an interactive psql shell in the database
docker compose exec db psql -U maconsim -d maconsim-db

# Check container status
docker compose ps

# Restart a single service
docker compose restart backend

Environment variables:

Backend (backend service):

Variable Default Description
RUST_LOG info Log verbosity (trace / debug / info / warn / error)
DATABASE_URL set by Compose PostgreSQL connection string (do not change unless using an external DB)
PKI_PATH /data/pki Directory for OPC UA / MQTT certificates (persisted in a volume)
LOGO_PATH /data/logo.jpeg Optional customer logo (a JPEG) shown next to the MaConSim logo. The file need not exist. To use one, mount it into the container, e.g. add - ./logo.jpeg:/data/logo.jpeg:ro to the backend service’s volumes in docker-compose.yml. The file must already exist on the host before docker compose up, otherwise Docker creates a folder of that name, which MaConSim ignores.

Frontend (frontend service):

Variable Baked-in default Description
VITE_REST_API_URL http://localhost:8080 Backend URL as seen from the browser

The frontend image has the backend URL baked in at build time. If you need to point it at a different host or port, contact support for a custom build.

MCP server (mcp-server service): configured with the MACONSIM_MCP_* environment variables (default user id, transport, bind address, tool exclusions, …) — see Section 16.3.4. The service is published on 127.0.0.1:8081 only, because it has no authentication.

Data persistence:

Your application data is stored in named Docker volumes and survives container restarts:

Volume What it stores Removed by down -v?
maconsim-pg-data All database data (schema + rows) ✅ Yes
maconsim-pki-data OPC UA / MQTT certificates ✅ Yes

Use docker compose down -v only when you want a completely clean reset. Use the Plant Export feature (Section 6.4) to create portable YAML backups that survive a volume reset.

License validation: The backend container requires an internet connection (outbound HTTPS on port 443) for license validation at every startup, the same as the desktop application.

Docker permissions: On Linux, Docker commands typically require either sudo or membership in the docker group. Add your user to the group with sudo usermod -aG docker $USER and log out/in for the change to take effect. Docker Desktop on macOS and Windows handles permissions automatically.

3.5 First Launch

On first launch you will be prompted to activate your license before you can use the application. See Chapter 4 for the activation steps.


4. License Activation

4.1 Activating a License

On first launch, MaConSim displays the License Activation screen. You must activate a valid license before the application can be used.

Steps:

  1. Enter your license key in the input field. Your key is provided by MaConSim GmbH after purchase or free trial registration. It is typically a long alphanumeric string.
  2. Click Activate License.
  3. MaConSim contacts the license server (https://api.maconsim.com) to validate the key. This requires an active internet connection.
  4. On success, the application proceeds to the login screen. Your license is now stored locally.

Subsequent launches: After successful activation, the license key is stored locally. On every subsequent launch, MaConSim validates it automatically in the background. You will only see the activation screen again if the license expires or becomes invalid.

Important: MaConSim revalidates your license every 24 hours. An active internet connection is required at least once every 24 hours to continue using the application. If you cannot connect to the license server within this period, the application will stop functioning until a connection is restored. There is no offline mode beyond this 24-hour window.

If activation fails: An error message is displayed with the reason. Common causes and solutions:

Error Solution
No internet connection Check your network connection and try again.
License key invalid Verify you copied the key correctly. Whitespace and line breaks are stripped automatically when pasting.
License expired Contact MaConSim GmbH to renew your subscription.
License already in use Contact MaConSim GmbH to release or transfer the license to this machine.
Machine limit exceeded Your license has reached its maximum number of activated machines. Deactivate an unused machine or upgrade your plan.

Re-activating: If your license was renewed or transferred, click Retry or Enter a Different License Key on the error screen and enter your updated key. For detailed server error messages, click Show details on the error screen.

4.2 Changing the License Key

If you need to replace your current license — for example because you upgraded to a new plan, transferred the license to a different account, or received a replacement key — you can do so directly from within the application without reinstalling.

Steps:

  1. Log in and open the License Info panel by clicking the License Info button in the top navigation bar.
  2. Click the Key button next to the active license status badge. An input field appears inline.
  3. Enter your new license key.
  4. Press Enter or click Activate.
  5. MaConSim contacts the license server to validate the new key. This requires an active internet connection.
  6. On success, the new license replaces the previous one. The panel updates immediately to show the new plan, expiry date, and license ID.

Note: Changing the license key fully replaces the previous key. The old key is removed from local storage and only the new key is retained.

If the activation fails: An error message is shown below the input field. Correct the key and try again, or click the X button to cancel and keep the existing license.

License ID: Your Keygen license UUID is displayed in the License Info panel and can be copied to the clipboard for support requests.

4.3 Upgrading or Downgrading Your Subscription

MaConSim does not offer an automated direct plan switch. To move to a different subscription tier (e.g. Basic → Premium or Premium → Basic), follow these steps:

  1. Purchase the new subscription tier at maconsim.com/licenses-pricing/ — the same page where your current subscription was bought.
  2. After purchase, you will receive a new license key by email.
  3. Enter the new key in MaConSim using the Change License Key feature — see Section 4.2.
  4. Cancel your old subscription via the Paddle customer portal.

Important billing notes:

  • No cancellation deadline: You can cancel your existing subscription at any time, even on the last day of the current billing period. Cancellation takes effect at the end of that period.
  • Immediate billing start: Your new subscription’s billing period begins immediately upon purchase, regardless of when you enter the license key or start using the application.
  • Parallel subscriptions: Between the date of your new purchase and the expiry of your old subscription, both are active and billed in parallel. You decide when to cancel the old one and when to buy the new one — MaConSim cannot merge, credit, or pro-rate the two billing periods.

4.4 License Maintenance

Machine Binding

MaConSim uses machine fingerprinting to tie your license to a specific computer:

  • Desktop installations: The license is bound to your machine’s hardware fingerprint. You can free the machine slot by using the Deactivate this machine button in the License Info panel.
  • Docker/container deployments: Use a fixed "server" fingerprint and do not consume a per-machine slot from your license.

Note: If your license has a machine limit and you see the "Machine limit exceeded" error, you must deactivate an unused machine or upgrade to a plan with more machine slots.

Deactivating a Machine

To free a machine slot and move your license to a different computer:

  1. Open the License Info panel (top navigation bar → License Info button)
  2. Click the Deactivate this machine button
  3. A confirmation dialog appears explaining that the license will be removed from this machine and the activation slot will be freed
  4. Click Confirm Deactivation to proceed
  5. The application will reload and return to the activation screen
  6. You can now activate the license on a different machine

Note: This feature is only available for desktop installations (Windows, macOS, Linux).

Monitoring Your License

Open the License Info panel (top navigation bar → License Info button) to view:

  • Status badge: Visual indicator showing Active (green), Expiring Soon (amber, when <7 days remaining), or Expired (red)
  • Plan name: Your subscription tier (e.g., Free Trial, Basic, Premium) as defined in your license metadata
  • License ID: Your unique Keygen license UUID — click the copy button to copy it to the clipboard for support requests
  • Expiration date: When your license expires (displayed as "Never" for non-expiring licenses)
  • Days remaining: Countdown to expiration

When your license is expiring soon (<7 days), an amber warning banner appears in the License Info panel with a link to renew your subscription. When expired, a red alert banner appears.

Error Details

If license validation fails, the error screen displays a user-friendly message. For technical troubleshooting, click Show details to reveal the raw server response message.

Firewall configuration: Ensure outbound HTTPS connections to api.maconsim.com on port 443 are allowed through your firewall for license validation to work.


5. Login and User Management

5.1 Logging In

  1. On the login screen, you first see a list of all existing users with their username and email address.
  2. Click on a user to select them.
  3. Enter your Password on the next screen.
  4. Click Login.

If your password is incorrect, an error message is displayed. Passwords are case-sensitive. If you are unable to log in, verify you are selecting the correct user account and entering the right password.

5.2 Logging Out

To log out of MaConSim:

  1. Click the Logout button in the top navigation bar.
  2. You will be returned to the login screen.

5.3 Creating User Accounts

User accounts can be created directly from the login screen:

  1. On the login screen, click Create New Account.
  2. Fill in the fields:
Field Requirement
Username Unique name used to log in (required)
Email Address Valid email address for the account (required)
Password Minimum 6 characters (required)
Confirm Password Must match the password (required)
  1. Click Create Account.
  2. The new user can immediately log in with their credentials.

5.4 Deleting User Accounts

User accounts can also be deleted from the login screen:

  1. On the login screen, select a user.
  2. Click Delete Account.
  3. Confirm the deletion in the dialog that appears.

Important: Deleting a user also deletes the plant data they created. This action cannot be undone.

License limit: The maximum number of user accounts is determined by your license plan (see Chapter 15). User creation is blocked when the limit is reached. Feature entitlements are determined by your license plan, not by individual user accounts.


6. Plant Management

A Plant represents a physical production site — a factory, a workshop, or a manufacturing cell. All resources in MaConSim (machines, orders, scenarios, connectivity settings, etc.) belong to a specific plant. You can create multiple plants to model separate sites or independent test environments.

Navigate to Plant Management from the main navigation bar.

6.1 Creating a Plant

  1. Click Add Plant.
  2. Fill in the fields:
Field Description
Name A unique display name for the plant (required)
Info A short subtitle or identifier, e.g. "Main Assembly Hall"
Description A longer description of the plant, its purpose, or production type
Location The physical address or site name
  1. Click Create Plant.

The new plant appears as a card on the Plant Management screen.

License limit: The maximum number of plants is determined by your license plan (see Chapter 15).

6.2 Selecting a Plant

Click on a plant card to open it. You are taken into the plant view, where all tabs and sections — machines, orders, connectivity, event logs, and the Production Operator Dashboard — relate exclusively to that plant. The currently selected plant name is displayed in the header section for easy reference.

The plant tab bar: the tabs of the plant view are grouped into dropdowns (Resources, References, Connectivity, Event Logs), with Production Operator Dashboard, Automation and DB Viewer shown directly. Every tab has an open in new tab button (the small icon next to the tab label) that opens exactly that view in its own window — a separate OS window in the desktop app, or a new browser tab/window in the Docker (web) version. Such a popup window shows only that one page, without the app header and tab bar, and you can keep several of them open side by side. The address of an open tab can also be copied and opened directly in another browser tab.

Use the main navigation bar to return to Plant Management and switch between plants.

6.3 Editing and Deleting a Plant

  • Click the Edit button on a plant card to edit its name, info, description, or location.
  • Click the Delete button to delete a plant.

Warning: Deleting a plant permanently removes all resources associated with it — machines, scenarios, orders, SFCs, NC codes, tools, alerts, data collections, OPC UA trees, and MQTT brokers. This action cannot be undone.

6.4 Exporting a Plant

The plant export feature allows complete plant configurations to be transferred between installations or used as backups.

  1. On the Plant Management screen, click the Download button on a plant card.
  2. A file will be downloaded to your browser’s default download folder, named plant-{plant-name}-export.yaml (YAML format; spaces in the plant name become dashes and the name is lowercased).

The export includes:

  • Plant details (name, info, description, location)
  • All machines
  • All simulation scenarios (machine sims)
  • Machine-scenario connections
  • Nonconformance codes (NC codes) and machine assignments
  • Dispositions and their connections to NC codes
  • Tools and machine assignments
  • Alerts and machine assignments
  • Alert-NC code connections
  • Data collections and machine assignments
  • Orders
  • SFCs (Shop Floor Control units)
  • Materials
  • OPC UA server configurations, including the complete address space: all nodes, their references/hierarchy, NodeSet2 metadata (namespaces, aliases, models) and referenced simulation configurations
  • MQTT broker configurations and topics
  • Trigger metadata (global triggers for the user)
  • Custom variables

Security note: MQTT broker passwords are omitted from the export for security reasons and must be re-entered after import.

Note: The plant export now embeds the full OPC UA address space (nodes, references and simulation configs), so a plant export/import is self-contained. NodeSet2 XML import/export (see Section 13.1.3) remains available for exchanging address spaces with third-party OPC UA tooling. Database-query node mappings are not part of the plant export and must be reconfigured after import.

6.5 Importing a Plant

License requirement: The importPlant entitlement must be enabled. Contact MaConSim GmbH if the button is greyed out.

  1. On the Plant Management screen, click Import Plant (top right of Plant Management).
  2. A file chooser opens — select a export file.
  3. The plant and all its resources are created in the database.
  4. The plant list refreshes automatically.

The imported plant is added as a new entry — it does not overwrite existing plants.

License limit: The maximum number of plants is determined by your license plan (see Chapter 15).


7. Create Resources

Navigate to a plant → Create Resources to manage all production resources within that plant.


7.1 Machines

Machines represent the physical production assets within your plant — CNC machines, presses, assembly stations, welding robots, or any other piece of equipment you want to model or simulate.

Navigate to a plant → Create Resources → Machines.

7.1.1 Creating a Machine

  1. Click Add Machine.
  2. Fill in the fields:
Field Description
Name Display name shown throughout the application (required)
Description Detailed free-text description of the machine
Model The machine model designation, e.g. "DMG DMU 50"
Manufacturer The manufacturer’s name, e.g. "DMG Mori"
Serial Number The physical serial number of the machine
Asset ID Your internal asset management identifier (for reference only — not processed by MaConSim)
Device Class Classification of the device type, e.g. "CNC Milling", "Robot Arm"
Device Revision Hardware revision or generation identifier
Status The initial operating status assigned when the machine is created
  1. Click Create Machine.

Asset ID, Device Class, and Device Revision are free-text fields intended for integration with your asset management or ERP system. MaConSim stores these values for reference but does not process them.

7.1.2 Machine Status

Every machine displays a live status badge reflecting its current state based on ISA-95/PackML standards:

Status Meaning
IDLE Machine is started and ready. With Auto-Start on it starts producing by itself as soon as an order is queued; with Auto-Start off it waits here with the order pending until the operator presses Start Production
STOPPED Machine is off. Start Machine brings it to IDLE
EXECUTING Machine is actively producing parts
SCHEDULED_DOWN Planned downtime (e.g. a running maintenance or the Scheduled Down button). Production pauses without stopping the simulation; Start Machine resumes — see Section 10.6
UNSCHEDULED_DOWN Unplanned downtime (e.g. the Unscheduled Down button). Production pauses without stopping the simulation; Start Machine resumes — see Section 10.6

Note: Additional ISA-95/PackML states (STARTING, COMPLETING, COMPLETE, HELD, SUSPENDED, ABORTED, ABORTING, CLEARING) will be available in future releases.

The status changes automatically during simulation based on the active scenario’s parameters. It is also set initially when creating a machine.

7.1.3 Editing, Copying, and Deleting a Machine

  • Click the Edit button on a machine entry to edit any of its fields.
  • Click the Copy button on a machine entry to duplicate it with a new name.
  • Click the Delete button to delete a machine.

Warning: Deleting a machine removes all its associated connections (scenarios, alerts, NC codes, tools, data collections) and any event history recorded for it. Orders and SFCs that were queued to this machine are not deleted but will lose their machine assignment.

License limit: The maximum number of production machines is determined by your license plan (see Chapter 15).


7.2 Simulation Scenarios

A Scenario defines the simulated behavior of a machine during production. It specifies how fast the machine produces parts, how often defects occur, how frequently alerts are raised, and more. One scenario can be connected to multiple machines, but one machine can only have one scenario.

Navigate to a plant → Create Resources → Scenarios.

7.2.1 Creating a Scenario

  1. Click Add Scenario.
  2. Configure the simulation parameters:
Field Description Default
Name Scenario name (required) —
Info Short subtitle or identifier for the scenario —
Description Detailed free-text description of the scenario —
Tool Logging When enabled, one tool usage event is recorded per takt for all selected tools connected to the machine. Requires at least one tool to be connected. Off
Takt Time (ms) The nominal duration of one production cycle in milliseconds. 60,000 ms = 1 minute per cycle. Minimum: 1,000 ms. 60,000
Takt Time Variance (ms) A random variation (±) applied to each takt. For example, a takt time of 60,000 ms with a variance of 5,000 ms means each cycle takes between 55,000 and 65,000 ms. Maximum: 50% of the takt time. 0
Units per Takt Number of parts produced in each cycle. Increase this for machines that produce multiple units per cycle (e.g. an injection mould with 4 cavities → set to 4). 1
Mixed Yield / Scrap On: every part of a takt is decided on its own — a takt may contain good and scrap parts (e.g. 3 good, 2 scrap out of 5). Off: the first part decides for the whole takt — if it is scrap, every part of the takt is scrap (e.g. 0 good, 5 scrap). Off
Respect SFC Boundaries Off: a takt may span several SFCs (e.g. part 1 on SFC-001, part 2 on SFC-002). On: a takt never spans SFCs; when fewer parts are left on the SFC than Units per Takt, the takt is shortened proportionally. Off
Scrap Handling: Overproduction Off (Continue): scrap counts as processed — an SFC with 10 planned that produces 7 good + 3 scrap is considered done (7 good parts in total). On (Overproduction): a new replacement SFC is automatically created for the scrapped quantity (e.g., SFC-001 produces 7 good + 3 scrap → a new SFC-001-R1 with planned qty 3 is added to the queue), repeating until all good parts are produced. Off (Continue)
Max Replacement SFCs per SFC Overproduction only (shown when Overproduction is on): upper limit of replacement SFCs created for one original SFC (minimum 1). When reached, further scrap is accepted and the order finishes. 10
Auto-Start On: a machine that is IDLE and has an order queued starts producing by itself (an automatic machine), also with the next order after one finishes. Off: the machine stays IDLE with the order pending until the operator presses Start Production on the dashboard (Section 10.5) — for every order. Use it to observe the IDLE state or to test MES state transitions (IDLE → EXECUTING → IDLE). On
Stop After Takt On: pause after every takt. The operator must press Start Machine on the dashboard to produce the next takt (and then Start Production if Auto-Start is off). Off
Stop After SFC On: pause once the current SFC finishes, before the next SFC in the queue starts producing. Press Start Machine to continue (and Start Production if Auto-Start is off). Off
Stop After Order On: stop the machine once an order completes instead of auto-starting the next queued order — the machine goes to STOPPED with the next order pending, and the operator presses Start Machine to begin each order explicitly. Off

Where do scrap, alerts, NC codes and maintenances come from? They are no longer scenario rates. Every connection between a machine and an alert, an NC code or a maintenance carries its own probability per part (Create References → Add Alerts / NC Codes / Maintenances to Machine). A part is scrap only if it carries an NC code whose disposition is scrap (Section 7.6); an SFC is SCRAPPED only if all of its parts are scrap.

Stop-after toggles: Stop After Takt, Stop After SFC and Stop After Order can be combined with each other and with Auto-Start. They only pause after production has happened — loading the first order onto a machine always starts it immediately.

  1. Click Create Scenario.

7.2.2 Understanding Takt Time

Takt time is the heartbeat of the simulation. A takt is a container of parts produced together (Units per Takt); every part belongs to exactly one takt, one SFC and one order. A takt produces its parts one after another; alerts, NC codes and maintenances are rolled once per part and, when they hit, occur at a random moment while that part is in production (in a takt without Mixed Yield/Scrap the parts are one batch, so the moment can be anywhere in the takt); at the end of the takt the parts are booked as good or scrap and the SFC counters are updated.

Example: Takt time of 30,000 ms (30 s), 2 parts per takt, an NC code with a scrap disposition connected at probability 0.10 and mixed yield/scrap on:

  • The machine produces 2 parts every 30 seconds.
  • Each part independently has a 10% chance of carrying the NC code and becoming scrap.
  • With mixed yield/scrap off, only the first part is rolled and the whole takt shares its outcome.
  • A scrap, an alert or a maintenance never shortens a takt — the takt runs to its end. Only Respect SFC Boundaries shortens the last takt of an SFC, and a maintenance pauses the takt clock for its duration.

Set the takt time to match the real cycle time of the machine you are modeling.

7.2.3 Editing, Copying, and Deleting a Scenario

The scenario list shows each scenario’s Id, name, takt time (with ± variance), units per takt and the enabled features as badges (Tools, Mixed, Overproduction).

  • Click the Edit button on a scenario entry to edit its parameters. Changes take effect from the next takt.
  • Click the Copy button on a scenario entry to duplicate it with a new name.
  • Click the Delete button to delete a scenario. All machine connections to this scenario are also removed.

License limit: The maximum number of scenarios is determined by your license plan (see Chapter 15).


7.3 Materials

Materials define the raw materials, components, or products that flow through your production process. They serve as master data that can be referenced by orders and Shop Floor Control (SFC) units, enabling consistent material tracking across your plant.

Navigate to a plant → Create Resources → Materials.

Creating a Material:

  1. Click Add Material.
  2. Fill in the fields:
Field Description Required
Material Number A unique identifier for this material, e.g. "MAT-1000" or "STEEL-001" Yes
Name Display name for the material, e.g. "Steel Bracket" or "Aluminum Profile" Yes
Description Additional details about the material, its properties, or intended use No
Unit of Measure The unit in which this material is measured, e.g. PC, KG, M, L No
Material Type Classification of the material type, e.g. RAW, FINISHED, SEMI_FINISHED No
  1. Click Create Material.

The new material appears in the list, sorted alphabetically by material number.

Editing and Deleting Materials:

  • Click the Edit button on a material entry to modify any of its fields.
  • Click the Delete button to delete a material.

Warning: A material cannot be deleted if it is referenced by an existing order or SFC. You must first remove all references to the material before deletion.

License limit: The maximum number of materials is determined by your license plan (see Chapter 15).


7.4 Orders and Shop Floor Control (SFC)

7.4.1 Understanding Orders and SFCs

An Order is a production job with a defined target quantity — it answers the question: "How many pieces of this product do we need to make?"

An SFC (Shop Floor Control unit) is an individual work item within an order — a specific production lot, a serial unit, or a batch that physically travels through a machine. Think of SFCs as the individual "tickets" that accompany material on the shop floor.

  • One order can contain many SFCs.
  • Each SFC has its own planned quantity, lifecycle status, and history.
  • When production runs on the dashboard, SFCs from the queue are processed in sequence.

7.4.2 Orders

Navigate to a plant → Create Resources → Orders. Click the View button on an order to navigate directly to its SFCs.

Creating an Order:

  1. Click Add Order.
  2. Fill in:
Field Description Default
Order Name A unique identifier for this order, e.g. "ORD-2026-001" (required) —
Info Additional information about the order. If left empty, it will be automatically filled with the Order Name. —
Unit of Measure The unit in which parts are counted, e.g. pcs, kg, m pcs
Target Quantity The total number of units this order requires 100
  1. Click Create Order.

Editing and Deleting Orders:

  • Click the Edit button to edit an order’s name, info, unit, or target quantity.
  • Click the Delete button to delete an order. All SFCs belonging to this order are also deleted.

Copying Orders:

  • Click the Copy button to duplicate an order. The new order will have the same parameters as the original, with "(Copy)" appended to the Order Name and Info field.

License limit: The maximum number of orders is determined by your license plan (see Chapter 15).

7.4.3 Shop Floor Control (SFC)

Navigate to a plant → Create Resources → SFCs (or click the View button on an order to go directly to that order’s SFCs).

The SFC table displays the following columns: SFC Number (with Serial Number), Order, Material, Status, Step progress, Quantity (Planned / Yield / Scrap), Priority, and Created date.

Filtering SFCs:

  • Use the Order dropdown to filter SFCs by a specific order
  • View allocation information showing how many units are allocated vs. remaining for each order

Creating an SFC:

  1. Click Add SFC.
  2. Fill in:
Field Description Required
Order The parent order this SFC belongs to Yes
SFC Number A unique identifier for this production unit, e.g. "SFC-001" Yes
Info Short info label for the SFC. If left empty, it will be automatically filled with the SFC Number. No
Material The material being processed (inherited from order if blank) No
Serial Number Optional serial number for traceability No
Unit of Measure Unit for quantity measurement, e.g. pcs, kg No
Planned Quantity The number of parts this specific SFC is planned to produce Yes
Priority Processing priority (numeric value) No
Notes Additional notes or instructions No
  1. Click Create SFC.

Auto-Generate SFCs: For efficient creation of multiple SFCs:

  1. Click Auto-Generate SFCs button
  2. Select the order for which to generate SFCs
  3. Specify the number of SFCs to create
  4. Optionally customize the SFC number prefix
  5. The system automatically:
    • Calculates the remaining capacity for the selected order
    • Distributes the remaining quantity evenly across the specified number of SFCs
    • Shows warnings if the quantity doesn’t divide evenly
    • Prevents generation if the order is fully allocated

Capacity Validation: When creating SFCs manually or through auto-generation, the system validates that the planned quantity does not exceed the remaining capacity of the parent order. If an order is fully allocated, no new SFCs can be created for it.

SFC Status Lifecycle:

SFCs move through the following statuses during their lifecycle:

Status Description
NEW Initial state when first created — not yet queued or started
IN_PROCESS Currently being processed by a machine
PAUSED Production halted because the machine itself was stopped — the SFC remains on the machine and can be resumed when the machine restarts
COMPLETE Successfully finished — all planned parts produced
SCRAPPED Finished with every part scrap (no good part). An SFC with at least one good part is COMPLETE even if some parts are scrap.
HOLD Temporarily paused for quality or organizational reasons, e.g. awaiting material or inspection

Managing SFC Status:

Use the action buttons to manually change an SFC’s status:

Action Resulting Status When to use
Complete COMPLETE Manually mark the SFC as finished
Scrap SCRAPPED / COMPLETE Write off everything still to be produced: the remaining quantity is booked as scrap parts. Not available while the SFC is being produced — stop the machine or put the SFC on hold first.
Hold HOLD Temporarily pause the SFC

Additional SFC Management:

  • Delete individual SFCs using the Delete button
  • Delete all SFCs for an order using the delete button when filtered by a specific order
  • View production progress through the Step column showing current step vs. total steps
  • Track quantities with planned, yield, and scrap quantities for each SFC

7.5 Nonconformance Codes (NC Codes)

NC Codes are predefined quality deviation categories. During simulation every NC code connected to a machine can occur on a produced part with the probability set on that connection. An NC code whose disposition is scrap makes the part it occurs on scrap; every occurrence is logged in the event history together with the part, takt and SFC it happened on.

NC codes allow you to analyze which defect types occur most frequently, on which machines, and during which orders.

Navigate to a plant → Create Resources → NC Codes.

Creating an NC Code:

  1. Click Add NC Code.
  2. Fill in the fields:
Field Description
Code A short identifier, e.g. "NC-001" or "DIM-FAIL" — used in reports and event logs (required)
Description Detailed explanation of what this nonconformance means
Severity The severity level of the nonconformance: Minor, Major, or Critical (required)
  1. Click Create.

Note: An NC code must be connected to a machine before it can occur during simulation. See Section 8.5. A scrap disposition scraps the part the NC code occurs on (see Section 7.6 and Section 8.8); an SFC is SCRAPPED only if all of its parts are scrap.

License limit: The maximum number of NC codes is determined by your license plan (see Chapter 15).


7.6 Dispositions

Dispositions define what happens to a part when an NC code occurs on it — for example scrap the part, or no action at all. Connect a disposition to an NC code (Section 8.8) so that whenever that NC code occurs during production, the linked disposition is applied: a Scrap disposition scraps the part the NC code occurs on, and an SFC is SCRAPPED only if all of its parts are scrap. Every occurrence is logged with its dispositions in the NC Code Occurrences log.

Navigate to a plant → Create Resources → Dispositions.

Creating a Disposition:

  1. Click Add Disposition.
  2. Fill in the fields:
Field Description
Name Display name of the disposition, e.g. "Scrap" or "Rework" (required)
Description What this disposition represents and when it is used
Action What happens to the part when a connected NC code occurs on it: None (no action) or Scrap (the part is scrapped) (required)
  1. Click Create Disposition.

The new disposition appears in the list with its Id, name, description, action and creation date. Use the search box to filter dispositions; click a column header to sort.

Editing and Deleting Dispositions:

  • Click the Edit button on a disposition entry to change its name, description or action.
  • Click the Delete button to delete a disposition. Deleting also removes its connections to NC codes; occurrences already logged keep their own copy of the disposition.

To make a disposition take effect during simulation, connect it to an NC code — see Section 8.8.


7.7 Tools

Tools represent physical tooling items used by a machine during production — for example, drill bits, milling cutters, cutting inserts, or punches. When tool logging is enabled in a scenario, MaConSim records one tool usage event per takt, helping you track tool consumption over production runs.

Navigate to a plant → Create Resources → Tools.

Creating a Tool:

  1. Click Add Tool.
  2. Fill in the fields:
Field Description
Name The tool’s display name, e.g. "8mm Drill Bit" (required)
Description Additional details such as grade, specification, or coating
Current Usage Count How many times this tool has been used. Incremented automatically when tool logging is active.
Max Usage Limit The maximum number of production cycles (takts) this tool can be used before it is considered worn out. Leave empty for no limit.
Count Mode Whether usage is counted Per Takt (+1 per production cycle) or Per SFC (+1 per completed SFC)
  1. Click Create.

Editing and Deleting Tools:

  • Click the Edit button to edit a tool’s name, description, usage count, or count mode.
  • Click the Delete button to delete a tool.

Max Usage Limit: Once a tool’s usage count reaches this limit, it will appear as exhausted in reports. This helps simulate realistic tool lifecycle management.

Note: A tool must be connected to a machine and Tool Logging must be enabled in the active scenario for usage to be tracked. See Section 8.6.

License limit: The maximum number of tools is determined by your license plan (see Chapter 15).


7.8 Alerts

Alerts define types of machine events that can be triggered automatically during simulation — for example, temperature warnings, vibration alarms, pressure drops, or door-open signals. During simulation every alert type connected to a machine can fire on a produced part with the probability set on that connection, and is logged with the part and takt it fired on.

Navigate to a plant → Create Resources → Alerts.

Creating an Alert:

  1. Click Add Alert.
  2. Fill in the fields:
Field Description
Name A descriptive name for the alert type, e.g. "Overtemperature Warning" (required)
Severity The severity level of this alert type (required)
Description Details about the alert, its typical cause, or recommended operator action

Severity levels:

Severity Typical Use
Low Informational events that require no immediate action
Medium A condition that should be monitored
High A fault condition requiring attention
Critical A serious fault that may require an immediate production stop
  1. Click Create.

Editing and Deleting Alerts:

  • Click the Edit button to edit an alert’s name, description, or severity.
  • Click the Delete button to delete an alert.

Note: An alert must be connected to a machine before it can be triggered during simulation. See Section 8.3.

License limit: The maximum number of alerts is determined by your license plan (see Chapter 15).

To assign alerts to machines, see Section 8.3.


7.9 Data Collections

Data Collections define named measurement channels associated with a machine — for example, spindle temperature, hydraulic pressure, vibration level, or cycle time. They represent the data points that MaConSim can publish externally via OPC UA or MQTT during simulation.

Navigate to a plant → Create Resources → Data Collections.

Creating a Data Collection:

  1. Click Add Data Collection.
  2. Fill in the fields:
Field Description
Name The name of the measurement channel, e.g. "Spindle Temperature" (required)
Data Type The data type of the measurement, e.g. Float, Integer, String
Unit The physical unit of the measurement, e.g. °C, bar, rpm, mm (required)
Description What is being measured, where on the machine, and its significance
  1. Click Create.

Editing and Deleting Data Collections:

  • Click the Edit button to edit a data collection’s name, description, data type, or unit.
  • Click the Delete button to delete a data collection.

Note: A data collection must be connected to a machine before it is active in simulation output. See Section 8.4. When connected, simulated values for this channel are available via OPC UA and MQTT if connectivity is configured. Each connection also holds the channel’s current value on that machine (for example 35 °C), which you set in Section 8.4.

License limit: The maximum number of data collections is determined by your license plan (see Chapter 15).


7.10 Maintenances

A Maintenance is a planned or unplanned stop of a machine. When a connected maintenance fires on a produced part, the machine goes into the maintenance’s down state (Scheduled down or Unscheduled down) for its duration (± variance), the running takt is paused, and afterwards the machine is EXECUTING again and the takt continues with its remaining time.

Navigate to a plant → Create Resources → Maintenances.

Field Description Default
Name Name of the maintenance (required, unique per plant) —
Description Free-text description —
Down state Scheduled down or Unscheduled down — the machine status while the maintenance runs Scheduled down
Duration (ms) How long the machine stays down 60,000
Duration Variance (ms) Random variation (±) applied to each maintenance 0

A maintenance must be connected to a machine (Section 8.9) before it can fire. Several maintenances can be connected, but only one runs at a time: a maintenance fires at most once per takt — if several are connected, only the earliest starts, and none starts while one is running. The operator can end a running maintenance early with Start Machine on the dashboard.


7.11 Reason Codes

A Reason Code says why a machine is in a state — for example Scheduled Down: Preventive Maintenance or Unscheduled Down: Material Jam. A reason code can be used for every state, not only the down states. A MES that reads the machine data can use it for a finer OEE.

Navigate to a plant → Create Resources → Reason Codes.

Field Description
Code The short identifier a MES reads, e.g. PM (required, unique per plant)
Name What an operator reads, e.g. Preventive Maintenance (required)
Description When this reason should be chosen

A reason code only applies to the machines and states it is connected to (Section 8.10). Giving a reason code is always optional: without one a state change works as before. A reason code that a machine currently has cannot be deleted; change the machine’s state first. Deleting a reason code removes its machine connections, while the Machine State Log keeps its own copy of code and name.

How the reason is kept: the active reason code is stored on the machine. A change of the machine’s state clears it unless the same change carries a new one, so a stale reason never stays — this also holds for changes made by the simulation, a flow, an OPC UA method or an AI agent. Changing only the reason of the current state updates the current line of the Machine State Log instead of starting a new period. The reason code of a machine is a column of the machines table (reason_code_id), so it can be shown on OPC UA nodes and MQTT topics through a Database Reference (join the reason_codes table for its text). A plant export carries the reason codes and their connections, not the reason a machine currently has.


8. Create References

References are the links between resources. Creating a machine is not enough on its own — you must explicitly connect scenarios, alerts, NC codes, tools, and data collections to machines for them to be active during simulation. This design allows the same resource (e.g. an alert type "Overtemperature") to be reused across many machines without duplication.

Navigate to a plant → Create References.


8.1 Connect Scenarios to Machines

A scenario must be connected to a machine before you can run a simulation on that machine. Each machine can have only one scenario connected at a time. To change a machine’s scenario, first remove the existing connection and then connect a different scenario.

Navigate to a plant → Create References → Connect Scenarios.

  1. Select a Machine from the dropdown.
  2. Select a Scenario from the dropdown.
  3. Click Connect.

The connection appears in the list below. Each machine can have only one active scenario connection.

To remove a connection, click the Delete button next to it. Removing a connection does not delete the scenario or the machine.


8.2 Load Order to Machine

Assign orders to a specific machine’s production queue. Queuing an order does not require a scenario to be connected — a machine without a scenario simply stays stopped until one is assigned in the Connect Scenarios tab.

Navigate to a plant → Create References → Load Order to Machine.

  1. Select a Machine from the dropdown. Each machine shows its connected scenario (if any) or a "no scenario" warning.
  2. The selected machine card displays its current scenario connection status.
  3. To add an order:
    • Select an Order from the dropdown (only fully allocated orders are available)
    • Click Add
  4. To remove an order, click the Delete button next to it.

Production Queue: The collapsible Production Queue section shows all queued orders with their position in the queue. The first order is highlighted with an "Up Next" badge, indicating it will be processed next.

SFC Production Queue: The collapsible SFC Production Queue section shows all queued SFCs for the selected machine. The first SFC is highlighted with an "In Process" badge.

Note: Orders can only be added to the queue if they are fully allocated (SFC planned quantities match the order target quantity). If an order has incomplete SFC allocation, it will be disabled in the dropdown with a message showing the current allocation vs. target.

Note: An order can be queued on only one machine at a time. Loading it onto a second machine is refused with a message naming the machine that already holds it; remove the order from that machine’s queue first.


8.3 Add Alerts to Machine

Alert types must be connected to a machine before they can be triggered during simulation. Only connected alert types can fire on that machine. When an alert event occurs, the simulator selects one randomly from all alerts connected to the machine.

Navigate to a plant → Create References → Add Alerts to Machine.

  1. Select the Machine from the dropdown.
  2. Select the Alert from the second dropdown.
  3. Set the alert probability (0–1) per part.
  4. Click Connect. The probability of an existing connection can be edited in the connection list.

To remove a connection, click the Delete button next to it.

Tip: Connect multiple different alert types to a machine to simulate a realistic mix of event types.


8.4 Add Data Collections to Machine

Data collection channels must be connected to a machine before their values are tracked and published. Only connected channels appear in OPC UA and MQTT output for that machine.

Navigate to a plant → Create References → Add Data Collections to Machine.

  1. Select the Machine from the dropdown.
  2. Select the Data Collection from the second dropdown.
  3. Click Connect.

To remove a connection, click the Delete button next to it. The log entries written for it (see Section 12.7) are kept.

Value of a connection: every connection carries the value the data collection currently has on that machine, for example 35 for a temperature collection in °C. A new connection has no value. Type it into the Value field of the connection in the list and click Save; clear the field and save to remove the value. The value is checked against the data collection’s Data Type: Float, Integer and Boolean (true / false) collections refuse text that does not fit; any other data type takes any text. The value is plain data: nothing in the simulation changes it, so you (or a flow or an AI agent) keep it up to date.

Every save is logged: each time a value is set, an entry (machine, data collection, old value → new value, time) is added to the Data Collection Log under Event Logs (Section 12.7); there is nothing to switch on. Linking a data collection with a starting value is not logged, because it is the initial state rather than a change.

Flows and functions read and write the same data with the capabilities machine_data_collection.get, machine_data_collection.set_value and machine_data_collection.get_log. AI agents use the MCP tools update_machine_data_collection_value and get_machine_data_collection_value_log, so no custom variable is needed to hold a measurement.


8.5 Add NC Codes to Machine

NC code types must be connected to a machine before they can occur during simulation. Every connected NC code rolls independently for each produced part with its own probability.

Navigate to a plant → Create References → Add NC Codes to Machine.

  1. Select the Machine from the dropdown.
  2. Select the NC Code from the second dropdown.
  3. Set the NC probability (0–1) per part.
  4. Click Connect. The probability of an existing connection can be edited in the connection list.

To remove a connection, click the Delete button next to it.

Tip: Connect multiple NC codes reflecting different failure modes to get a realistic distribution of nonconformance events. Scrap only happens for NC codes with a scrap disposition (see Section 8.8).


8.6 Add Tools to Machine

Tools must be connected to a machine before tool usage events can be logged during simulation. Tool Logging must also be enabled in the active scenario. When a tool event fires each takt, the simulator selects randomly from the tools connected to that machine and increments its usage counter.

Navigate to a plant → Create References → Add Tools to Machine.

  1. Select the Machine from the dropdown.
  2. Select the Tool from the second dropdown.
  3. Click Connect.

To remove a connection, click the Delete button next to it.


8.7 Connect Alerts to NC Codes

Link alerts to nonconformance codes so that whenever an alert is active during production, each connected NC code is automatically recorded with the specified quantity.

Navigate to a plant → Create References → Alert–NC Code Connections.

  1. Select an Alert from the dropdown.
  2. Check the NC Codes you want to connect (use Select All or Clear for quick selection).
  3. Click Connect. If connecting multiple codes, a progress bar shows the completion status.

The active connections list displays all alert–NC code links, grouped by alert. Each entry shows the NC code, description, severity, and the configured quantity.

To remove a connection, click the Delete button next to it. This only removes the link, not the alert or NC code themselves.

Tip: Connect alerts to relevant NC codes to simulate realistic quality issues when specific alert conditions occur during production.


8.8 Connect NC Codes to Dispositions

Link dispositions to NC codes so that whenever an NC code occurs during production, every linked disposition is applied — for example a Scrap disposition, which scraps the part the NC code occurs on. An SFC is SCRAPPED only if all of its parts are scrap.

Navigate to a plant → Create References → Connect NC Codes to Dispositions.

  1. Select an NC Code from the dropdown.
  2. Check the Dispositions you want to connect (use Select All or Clear for quick selection). Only dispositions not yet connected to this NC code are offered.
  3. Click Connect. If connecting multiple dispositions, a progress indicator shows the completion status.

The active connections list displays all NC code–disposition links, grouped by NC code. Each entry shows the disposition with its action badge (scrap / none).

To remove a connection, click the Delete button next to it. This only removes the link — the NC code, the disposition and already logged occurrences are kept. Each entry in the NC Code Occurrences log keeps the dispositions that were connected when it occurred.

Tip: Create a Scrap disposition once (Section 7.6) and connect it to every NC code that represents a real scrap cause, so scrap in the simulation matches your quality data.


8.9 Add Maintenances to Machine

Navigate to a plant → Create References → Add Maintenances to Machine.

  1. Select the Machine from the dropdown.
  2. Check the Maintenances you want to connect (use Select All or Clear).
  3. Set the maintenance probability (0–1) per part.
  4. Click Connect. The probability of an existing connection can be edited in the connection list.

To remove a connection, click the Delete button next to it.


8.10 Add Reason Codes to Machine

Navigate to a plant → Create References → Add Reason Codes to Machine.

  1. Select the Machine.
  2. Select the Machine Status (Stopped, Idle, Executing, Scheduled Down or Unscheduled Down).
  3. Select the Reason Code (Section 7.11).
  4. Click Connect. All three are required; the button stays disabled until they are chosen.

The same reason code can be connected to several statuses of a machine (once per status). The list below shows machine, status and reason code; to remove a connection, click the Delete button next to it. Only the codes connected to a machine for the status it goes into are offered to the operator, and the backend refuses any other code (also when it comes from a flow or an AI agent). Removing a connection does not change a machine that currently has that reason; it keeps it until its next state change.


9. Advanced Database Features

The Advanced Database Features provide powerful tools for extending MaConSim’s data model and automating database operations. These features allow you to add custom data fields to entities and create automated responses to database changes.

Custom Variables, Database Triggers and Python Functions live in the plant’s Automation tab (top tab bar, next to the Production Operator Dashboard). The tab has the sub-tabs Flows, Functions, Buttons, Displays, Triggers, Variables and SQL Triggers (Advanced). It opens on Flows the first time and afterwards on the sub-tab you used last (also after you leave the page or restart the app); the selected sub-tab is part of the address, so it can be opened in a new tab, and an address that names a sub-tab always opens that one. Flows, Buttons, Displays (Section 9.5.1), the Run Log and Triggers are described in Sections 9.4–9.7 (the Run Log is part of Event Logs); Section 9.8 summarizes the dry run and the limits. Triggers (no-code: "when this data changes, run this flow") are not the same as the SQL Triggers (Advanced) of Section 9.1, which run raw SQL inside the database; prefer the no-code triggers.

License requirement: Advanced Database Features require the appropriate database entitlement.

9.1 Database Triggers

Database triggers allow you to automatically execute SQL statements in response to specific database events such as INSERT, UPDATE, or DELETE operations on a table. This enables powerful automation without requiring external integration.

Key capabilities:

  • Create and manage triggers: Define triggers with custom SQL that executes automatically when specified events occur
  • SQL validation: Built-in validation ensures your trigger SQL is syntactically correct before saving
  • Dialect support: Automatic adaptation for SQLite and PostgreSQL database syntax
  • Target table selection: Associate triggers with specific tables from the available MaConSim data model
  • Active/Inactive status: Enable or disable triggers without deleting them
  • Example templates: Pre-configured SQL examples for common use cases on different tables

Common use cases:

  • Automatically update related records when data changes (e.g., update machine status when an SFC completes)
  • Enforce business rules and data validation beyond standard constraints
  • Log changes to critical data for audit purposes
  • Cascade updates across related tables

To create a database trigger:

  1. Navigate to Automation → SQL Triggers (Advanced) (raw database triggers run inside the database; a banner reminds you to prefer no-code triggers)
  2. Click Create Trigger
  3. Enter a Name and optional Description
  4. Select the Target Table from the dropdown
  5. Write or paste your trigger SQL in the editor
  6. Click Validate SQL to check for syntax errors
  7. Toggle Active to enable the trigger (enabled by default)
  8. Click Save

The trigger editor provides:

  • Example SQL: Load pre-configured examples for the selected table type
  • Table browser: Preview actual table data and schema to help write accurate SQL
  • Validation feedback: Clear error messages for SQL syntax issues
  • Duplicate detection: Warning if a trigger with the same name already exists

9.1.1 SQL Trigger Templates

A trigger template builds a database trigger without writing SQL. Open Automation → SQL Triggers (Advanced): the Trigger templates section is at the top, above the raw SQL triggers of Section 9.1. A template says which table, when (before or after the change), which events (insert, update, delete, optionally only when given columns change), an optional condition on the new or old value of a column, and exactly one action:

  • Write an event (the safe default): a row in sql_trigger_events with the table, the operation, the row id and the columns you picked. The newest events are listed under the templates. A no-code Trigger (Section 9.7) can watch sql_trigger_events, so the database trigger detects a change inside the transaction and an automation flow reacts.
  • Set a column of the row (before insert or update): a fixed value, a value from the new or old row, or the current time (epoch seconds). On SQLite the value is written right after the change.
  • Refuse the change (before): the write fails with your message.

Click Preview SQL to see the SQL that the template generates; nothing is executed. A template is created inactive. Review SQL opens the generated SQL read-only: Approve approves exactly the SQL you were shown (an edit in the meantime makes the approval fail), then Activate creates the database trigger (mcp_trg_<name>, on PostgreSQL with a function mcp_fn_<name>). Activation regenerates the SQL from the template and refuses it when it no longer matches what you approved. Deactivate drops the trigger; Delete removes the template (and its events). A template cannot be edited while it is active.

Rules that keep templates safe: a trigger only sees your own rows (user_id); it cannot target accounts, licensing, the trigger tables or the automation tables; the tables the simulation writes (takts, parts, order and alert histories, …) can be watched with an event but not changed or vetoed; the counters only the simulation writes (yield_quantity, scrap_quantity) and the columns id, user_id and plant_id cannot be set; cascades of triggers stop after a depth of 3. You can have at most 20 templates. A template an AI agent creates (Section 16.3) or imports is Pending review (badge, with created by agent or imported) and cannot be activated until you approve it; if the agent changes it, it goes back to pending. A template from a plant file you import yourself is approved but stays inactive. Plant files carry the template, never SQL; the SQL is regenerated and checked against this database on import.

Note: The raw SQL triggers of Section 9.1 stay a person’s tool: an AI agent can never create or edit them. On PostgreSQL a raw trigger is a single CREATE TRIGGER that calls a function which already exists; use a template when you do not want to write SQL.

9.2 Custom Variables

Custom Variables allow you to add custom data fields to MaConSim entities, extending the standard data model without modifying the core database schema. These fields can store additional information specific to your use case or organization.

Key capabilities:

  • Flexible field types: Support for Text, Integer, Numeric, and Boolean data types
  • Entity association: Attach custom fields to various entity types including Plants, Machines, Orders, Materials, Alerts, Data Collections, and NC Codes
  • Global or scoped: Create global variables or scope them to specific entities
  • Validation: Automatic validation based on the selected data type
  • Search and filter: Quickly find custom variables by name or entity type

Common use cases:

  • Add organization-specific metadata to machines (e.g., maintenance schedules, location codes)
  • Extend order data with custom tracking fields (e.g., customer reference numbers, priority codes)
  • Store additional material properties not covered by standard fields
  • Track custom configuration parameters for alerts or data collections

To create a custom variable:

  1. Navigate to Automation → Variables
  2. Click Create Custom Variable
  3. Select the Entity Type (e.g., Machine, Order, Plant, Global)
  4. Enter the Field Name (must be unique within the entity scope)
  5. Select the Value Type (Text, Integer, Numeric, or Boolean)
  6. Enter the Field Value (must match the selected type)
  7. Add an optional Description to document the field’s purpose
  8. Click Save

The custom variable editor provides:

  • Type-specific validation: Prevents invalid values (e.g., non-numeric input for Numeric type)
  • Duplicate detection: Ensures field names are unique within their entity scope
  • Entity filtering: View variables by specific entity type
  • Search functionality: Quickly locate variables by name

9.3 Python Functions

A Python function is a named, reusable unit with typed inputs and outputs. It is written as a Python script or as a low-code flow and implements OPC UA methods (Section 13.1.5.3). Manage functions under Automation → Functions.

The Functions list shows each function’s name, kind (Python or Low-code), signature, timeout, how many OPC UA methods and flows use it, and when it was changed. Use the search box to filter. Row actions: Run (typed inputs, Test (no changes) or a confirmed real Run), Edit, Duplicate and Delete. A function that is still used cannot be deleted; the error names every OPC UA method and flow that uses it. Until the plant has a function, a getting-started hint is shown.

To create a function:

  1. Click Add Function, enter a Name (unique in the plant), an optional Description and a Timeout in seconds.
  2. Choose the source:
    • Python Script: write one function with typed parameters (int, float, str, bool). Its signature defines the inputs and outputs; -> tuple[bool, str] returns several values. Allowed modules: math, datetime, json, re, itertools, functools, decimal, fractions, statistics, random (see Section 9.3.2 for what else is restricted). Call the host with host.call(id, args); read run values with host.context["plant_id"].
    • Low-Code Flow: values reach a step only through a connected line from an input variable box (or from another step’s result), and the function’s results only come from output variable boxes. On the canvas, Add input variable creates a box with a Source: Asked at run (a function input: name and type; the caller supplies it), Fixed value (a constant with a name, type and value) or Context (the user, plant, machine or run id of the run; always an integer). Changing the source keeps the name and every line. Add output variable adds an output box (name and type, the value handle on its left); a function always keeps at least one, and every output must be connected by a line from a value of the same type (an integer may feed a float output) before the function is valid. Steps are Capability call, If / else and For each: a Capability call shows one row per argument with a purple dot; drag a line from a box’s handle (right) to the dot of the argument (left), or leave an argument with a default (for example the user or plant id) unconnected. Dragging highlights the handles a line can connect to; a line to an argument that already has one replaces it. To remove a line, click it and press Delete, or click the ✕ on the line. For a value inside an object or list, type a path such as items.0.name next to the connected argument. Drag any box by its header to place it; the positions are saved with the function. A function saved with the older Return or Set variable step opens converted to boxes and lines (Converted to input/output variables — save to keep it); a Return inside an If / else keeps working but can no longer be added. Steps with a problem get a red ring.
  3. The editor validates while you type (about half a second after the last change) and shows the parsed signature, for example (a: int, b: int) → int. Save Function is available once the function is valid.
  4. Open Test, enter inputs and click Test (no changes) to see the outputs and the list of changes the function would make.
  5. Helpers: the Capabilities palette (grouped by area: machine, order, sfc, takt, part, sim, alerts, NC codes, maintenance, materials, tools, OPC UA, MQTT, …) lists everything a function can read or change at run time and inserts host.call snippets or complete examples. Plant setup (creating machines, plants, alerts, NC codes), deleting (except orders and SFCs), accounts, licensing, credentials and starting or stopping servers are not available to functions. Values that carry a password (MQTT brokers, OPC UA trees) are returned without it. Other helpers: Available OPC UA Nodes lists node ids and identifiers, and Available Database Tables previews table rows.

Functions are atomic: a run uses one script execution and applies staged simulation changes only when it succeeds. A function that exceeds its timeout is stopped.

Note: Python must be installed for Python scripts (see Section 13.1.5.3). Without it, only low-code functions can be created.

9.3.1 Functions Written by an AI Agent

A function runs as soon as it is saved, whoever wrote it: there is no approval step. A function that an AI agent creates through the MCP server (Section 16.3) or that arrives through a plant import shows a badge created by agent or imported next to its name, so you can tell it from the ones you typed yourself. A Python script from an agent is subject to the same sandbox rules as yours (Section 9.3.2); that sandbox, not a review, limits what it can do. Click Edit on such a function to read it before an automation or an OPC UA method uses it.

9.3.2 Rules for Python Scripts (Sandbox)

A script runs in an isolated interpreter. Where the embedded sandbox is available (macOS and Linux by default; see below), that is CPython 3.14 compiled to WebAssembly (WASI) inside the application: the script has no files (only the read-only standard library), no network, no environment variables and no way to start processes, a memory limit of 256 MiB, a CPU deadline and limited output. Otherwise it runs in a separate system Python process with an empty environment, an empty working directory, limited output and a limited number of parallel runs. In both cases a static check refuses, before the script runs and while you edit it, scripts that try to reach below the sandbox. A refused script is not saved; the editor lists every finding with its line, for example line 3: access to the private or special attribute '__class__' is not allowed.

  • Refused: attributes that start with an underscore (__class__, __globals__, _os, …), frame and code introspection (gi_frame, f_globals, tb_frame, mro, …), str.format and str.format_map (use f-strings or %), names that start with two underscores (__import__, __builtins__), class definitions, global, star and relative imports, and imports of modules other than the allowed list.
  • Not available as builtins: open, exec, eval, compile, print, input, getattr, setattr, hasattr, type, object, id, issubclass, callable, bytearray, globals, locals, vars, dir and similar. A parameter or variable of your own may use these names (def f(id: int) works); calling the builtin is reported with the line. Scripts written for an earlier version that use getattr, type, id, hasattr, callable, issubclass or bytearray must be changed.
  • Modules are read-only views of their public names. Names a module only imports itself (fractions.sys, json.codecs) do not exist, and only whole allowed modules can be imported (import json, from json import dumps, not import json.decoder).
  • Size limits: at most 64 KiB of script, 20,000 syntax nodes and 100 levels of nesting.
  • Per run: at most 1,000 host.call invocations (the next one ends the run) and at most 8 runs at the same time. In the system-Python fallback the process also gets CPU, open-file, file-size and (Linux only) memory limits and its own process group, which is stopped as a whole on a timeout or cancel; on Windows it runs in a job object with a memory limit.
  • Which sandbox runs: MACONSIM_PYTHON_SANDBOX = auto (default: the embedded WASI interpreter when its files are present, on Windows, macOS and Linux alike, else the system Python), wasi (only the embedded one; without its files Python is unavailable) or subprocess (the system Python). The embedded interpreter’s files come from scripts/fetch_python_wasi.py (pinned release, checked by hash); the first start compiles and caches them (set MACONSIM_PYTHON_WASI_CACHE for the cache folder). Scripts must work in both, so they should not depend on the Python version.

Note: The embedded WASI sandbox is an isolation boundary; the system-Python fallback is only hardening, not a guarantee against hostile code. The editor and get_python_runtime_status show which one is active (strong or basic). An AI agent can test a Python draft (test_python_function_draft) only when the sandbox is strong. Functions an agent wrote run without a review (Section 9.3.1), so check that the strong sandbox is active before you let an agent write Python scripts.

9.4 Automation Flows

An automation flow is a procedure that runs step by step: it calls functions (which reach the system through capabilities), waits, branches, loops and calls other flows. Unlike a function, a flow is not atomic: every step takes effect immediately, so "load order, wait 5 s, start" really happens in that order. Manage flows under Automation → Flows.

The Flows list shows each flow’s name, its inputs, how many buttons, triggers and other flows use it, its concurrency setting and the status of its last run. Row actions: Run (typed inputs, Test (no changes) or a confirmed Run now), Edit, Duplicate and Delete. Deleting a flow also deletes its buttons, triggers and run history (the confirmation says how many); a flow that another flow calls cannot be deleted.

To create a flow:

  1. Click Add Flow. In the left column enter a Name (unique in the plant), an optional Description, the Timeout of the whole run in seconds and what happens If already running (Skip or Run in parallel).

  2. On the canvas, click Add input variable for each value the flow needs: a box appears with a Source, and it needs no connection to Start:

    • Asked at run: the value is a flow input that a button, trigger, display or calling flow supplies. Give it a name and type and optionally a label, a default (prefilled in the button dialog) and an entity picker (machines, orders, SFCs, custom variables, OPC UA nodes) so the operator chooses from a list.
    • Fixed value: a constant (name, type, optional picker, value) that is never asked and not part of the flow’s inputs.
    • Context: a value of the run (name and the user, plant, machine or run id). The machine is only set when the run has one (a machine-row button, or a trigger on machines); on a dashboard button use Asked at run with a picker instead, otherwise the run fails with a message that says so.

    Changing the source keeps the name and every line; renaming a variable keeps its lines. Outputs are optional: Add output variable adds an output box (name and type) that you connect with a line from a value of the same type: an input variable, or a step’s result (a function or flow with several outputs offers each named result on its own row). Once added, an output must be connected; the editor reports "Output ‘x’ is not connected" until it is. Drag a box by its header to place it; positions are saved with the flow.

  3. Build the steps on the canvas with Add step:

    • Run function: choose a saved function; it shows one row per input with a purple dot, name: type and its state: ← connected box, not connected (red when the input is required; "Connect input ‘y’ of the function ‘f’" is reported) or a muted default. Draw a line from an input variable box or another step’s result: type row to the dot. A function’s result is named when its handle is first connected. New function… and Edit function… open the function editor without leaving the flow. Optional timeout override. A function is also how a flow reaches the system (machines, orders, SFCs, OPC UA, simulation): there is no separate capability step in the Add step menu. While the plant has no functions the step says so and offers New function…; the flow cannot be saved until a function is selected ("Select a function for this step"). Run flow behaves the same when there is no other flow.
    • Run flow (another flow; a cycle such as A → B → A is rejected; connected like Run function), Wait (milliseconds, seconds or minutes), If / else, For each and Log. Wait, Log, If / else and For each keep a fixed value typed into the step, or take a connected line instead (the chip shows ← name; its ✕ goes back to a fixed value). There is no Return and no Set variable in the menu.
    • Steps that call something have an On error setting: Stop the run or Continue (the result then holds the error message).
  4. Remove a line by clicking it and pressing Delete, or with the ✕ on the line: a call argument becomes unset, a fixed slot returns to a fixed value and an output becomes unconnected. Connecting a new line to a slot that already has one replaces it. While you drag a line, the handles it cannot connect to are dimmed.

  5. The editor validates while you work; steps with a problem get a red ring and the messages are listed below the canvas (an unconnected output or required argument is reported there). A flow with errors can still be saved as a work in progress, but it does not run until they are fixed.

Flows saved with the older shape. A flow that ends in a Return step, or has fixed or context values typed into the arguments of a Run function or Run flow step, opens converted into variable boxes and lines (Converted to input/output variables — save to keep it); nothing changes until you save, and the flow means the same either way. A Return inside an If / else stays as it is (it still runs and can be deleted, but cannot be added); flows written by an AI agent with Return steps keep running unchanged.

Reordering steps (connection lines). Steps run top to bottom along the grey connection lines, and Add step always appends to the end of its container. A stored Return ends its path, so no Add step appears behind it; delete the Return to continue that path. To place a step elsewhere, drag a connection from a control output (the grey dot at the bottom of a node) to the control input (the grey dot at the top) of the step you want to move; the lines redraw immediately:

  • From Start to a step: that step becomes the first step of the flow, in front of everything else.
  • From a step’s next output to another step: the other step now runs directly after it. The steps that were behind the moved step close the gap.
  • From the then, else or loop output of an If / else or For each step: the step becomes the first step inside that branch or loop (use this to move a step into or out of a branch).

The moved step takes its nested steps with it. A step cannot be moved behind itself or into its own branch or loop; such connections are refused while you drag. Control connections never connect to purple data dots, and data wiring is unchanged. Moving a step can place it before the step that produces a variable it reads; the editor then flags it with a red ring until you pick another variable.

Test & run. Open Test & run below the canvas, enter the inputs and click Test (no changes): reads run, every change is only listed ("Would call machine.set_status …") and waits are skipped. Run now asks for confirmation and then applies every step. Unsaved changes are saved first. The run is followed live with its step timeline.

Note: In a test, steps that change data return a placeholder instead of a real result, so a flow that branches on such a result may take a different path than a real run.

Limits. A run stops after 10,000 steps, a loop handles at most 1,000 items, flows may call flows to a depth of 3, one wait lasts at most one hour, and the whole run is stopped at the flow’s timeout (default 5 minutes). Changing a flow’s inputs is refused while it would break the input bindings of a button, display or trigger (or removes an output that a display shows); the editor then offers Save anyway (drop invalid bindings), which makes buttons ask the operator again and switches off the displays and triggers concerned.

9.5 Automation Buttons

A button starts a flow from the Production Operator Dashboard. Manage buttons under Automation → Buttons. The list is grouped by placement and shows a preview of each button, the flow it runs, its input bindings, an enabled switch and up/down arrows that set the order. Row actions: Edit, Duplicate, Delete.

To create a button:

  1. Click Add Button (a flow must exist; the button dialog also offers New flow…).

  2. Enter a Label, an optional description, pick an Icon and a Color. The preview shows the button as the operator will see it.

  3. Choose the Placement: Dashboard – Quick Actions or Each machine row. For machine rows you can limit the button to some machines (empty means every machine).

  4. Select the Flow and decide for each flow input how it is filled:

    • Ask operator: a dialog asks for the value when the button is pressed. The dialog opens prefilled with the button’s default if there is one, else the flow input’s default, else the type’s default.
    • Fixed value: the value is stored with the button and hidden from the operator.
    • Context: machine of row: machine-row buttons pass the machine of the row into an integer input.

    Inputs without a setting ask the operator. Changing the flow or the placement keeps only the settings that still fit.

  5. Optionally enter a Confirmation message; the operator must confirm before the flow starts.

  6. Click Create Button.

Disabled buttons are not shown on the dashboard. A flow set to Skip that is still running is not started a second time; the dashboard reports "already running".

9.5.1 Automation Displays

A display shows the output of a flow on the Production Operator Dashboard: a count, a status text, a computed value. Manage displays under Automation → Displays; the list works like the one of buttons (grouped by placement, enabled switch, up/down arrows, Edit, Duplicate, Delete). A display never runs its flow for real. It either shows the result of the flow’s last run (for example a run started by a dashboard button) or evaluates the flow live, like Test (no changes) (reads run, changes are never applied, waits are skipped), and a refresh leaves no entry in the Run Log.

Typical use: create a flow with one input variable and one output variable, wire the input to the output, add a button for the flow that asks for the input, and add a display that updates When the flow runs. The operator presses the button, types the value, and the display shows the flow’s output and stays on it until the button is pressed again.

To create a display:

  1. Click Add Display (a flow with at least one output must exist; the dialog also offers New flow…). Outputs are the flow’s output variable boxes.
  2. Enter a Label, an optional Unit (shown after a single value, for example pcs) and an optional description.
  3. Choose the Placement: Dashboard – Displays card or Each machine row. For machine rows you can limit the display to some machines (empty means every machine).
  4. Select the Flow and the Flow output to show, or Every output to list all of them as name: value.
  5. Choose how the display Updates:
    • When the flow runs (default): the display shows the output of the flow’s last run and keeps it until the flow runs again, whether a button, a trigger or Run in the flow editor started it. The flow’s inputs are set by whatever runs it (the button asks the operator), so there are no input bindings and no refresh interval. Test runs (Test (no changes)) are ignored. On a machine row only the runs of that machine count. Until the flow has run the display reads No run yet, and if the last run failed it shows the error. The display is titled Flow name – Display name.
    • Live: the display runs the flow read-only at regular intervals. Decide for each flow input how it is filled: a Fixed value, or on machine rows Context: machine of row (an integer input receives the machine of the row). A live display cannot ask anyone, so every input needs a value. Set Refresh every (seconds) (default 10, at most 3,600); 0 refreshes only when the operator clicks the refresh button.
  6. Click Create Display.

A flow that fails shows its error in red where the value would be. Changing a flow is refused while it would break a display (an input binding of a live display that no longer fits, or the shown output removed); Save anyway then drops the invalid bindings, shows every output again and switches the display off until you check it. The flow cannot be deleted without its displays: deleting a flow deletes them too. Displays are part of the plant export.

9.6 Automation Run Log

Event Logs → Automation Run Log lists every run of the plant’s flows (the last 500 per plant are kept, plus the latest outcome of each flow that a display updating When the flow runs shows). Filter by flow, status and source. Each row shows when the run started, the flow, where it came from (Button: <label>, a trigger, Manual), the machine, the status (Running, Succeeded, Failed, Cancelled, Timed out, Skipped), the duration and a Dry run badge for tests. The list refreshes every 2 seconds while a run is going.

Click a row to see the run’s inputs, outputs, error and step timeline: for every step its status, label, start offset, duration, the parameters it was called with (the capability, the Python function or the nested flow), its output, the steps of nested flows and — for dry runs — the changes that would have been made. A running run has a Cancel button; cancelling stops it before the next step, wakes a running wait and stops a running Python function. Runs left running by an application restart are marked failed ("Interrupted by application restart").

Automation flow log (application log). Besides the Run Log, every run writes lines to the application log (the terminal of the desktop app, the REST server output or the container log) under the log target automation. They tell what started the flow and what it did, for example:

INFO automation: Automation run started run_id=12 flow=Load and go source=button 'Start line' machine=Press 1 (#3) dry_run=false inputs={"order_id":42,"speed":120}
INFO automation: Calling function 'check_order' with {"order_id":42} run_id=12 depth=0
INFO automation: Step s2 (check_order) succeeded in 143 ms -> true run_id=12 depth=0
INFO automation: Automation run finished run_id=12 flow=Load and go status="succeeded" duration_ms=5230

The source is button '<label>' (with the machine of the dashboard row the button was pressed on and the inputs it was given), trigger '<name>' (machines.status UPDATE row #3: 'IDLE' -> 'STOPPED') (the change that fired it) or manual. Every call of a capability, Python function or nested flow gets a Calling … line with its parameters before it runs, and every step a line with its outcome; failed steps are logged as warnings and repeat the parameters. Use RUST_LOG=info,automation=warn to keep only the failures of the flow log, or RUST_LOG=info,automation=off to silence it (the other log lines stay at info).

9.7 Automation Triggers

A trigger starts a flow by itself when data changes: a machine stops, an order finishes, an alert is raised. Manage triggers under Automation → Triggers. A trigger fires only while the user who owns it is logged in, and only for rows of its own plant.

The list shows each trigger with a sentence that describes it (When Machines › status of any machine changes to STOPPED, run Notify maintenance (1 s).), an enabled switch, when it last fired and how often, and the error of its last run in red. A trigger that switched itself off (see below) shows the reason and a Re-enable button.

To create a trigger:

  1. Click Add Trigger (a flow must exist; the dialog also offers New flow…) and enter a Name.
  2. When: click a template (Machine status changes, SFC completed, Order finished, Custom variable changed, Alert raised, NC code recorded) or choose the Table, the kind of Change (a field changes, a row is added, a row is deleted) and the Field. The choices come from the database itself: only changes that the database records are offered. Optionally limit the trigger to one specific row (for example one machine); a delete trigger cannot be limited by plant or row because a deleted row cannot be looked up.
  3. Condition (optional): compare the new value and/or the old value of the field (equals, does not equal, is greater than, is at least, is less than, is at most, contains). Values are compared as numbers when both sides are numbers, otherwise as text. Status fields suggest their values.
  4. Then run: select the flow and fill each of its inputs From event (row id, table, operation, field, old value or new value; the database stores them as text and MaConSim reads them as the input’s type) or with a Fixed value.
  5. Options: the Cooldown (minimum time between two runs, default 1 s) and Enabled. The sentence at the bottom summarizes the trigger.

Safeguards. A trigger ignores a repeated change of the same row within 2 seconds when it watches no single field (an insert writes one change per field), respects its cooldown, and is switched off when it fires more than 20 times in 10 seconds, because its flow most likely changes what the trigger watches. The Run Log names the trigger of every run it started (Trigger: <name>); the trigger shows the error of its last run. If a trigger cannot start its flow because an input does not fit (for example the changed value is text but the input is an int), the Run Log still lists the call as a Failed run with the reason, without any steps. Changes made by the automation tables themselves are never watched. Imported triggers whose row filter cannot follow the imported rows are imported disabled with the note "Row filter dropped during import".

9.8 Dry Run and Limits

  • Test (no changes) (flows and functions): reads run, changes are only listed, waits are skipped (Sections 9.3 and 9.4). Live displays (Section 9.5.1) always run this way, limited to 15 seconds per refresh; displays that update when the flow runs do not run the flow at all.
  • Functions are atomic, flows are not: a function applies its simulation changes only if the whole script succeeds; a flow applies every step at once.
  • Limits: 10,000 steps per run, 1,000 loop items, 3 levels of flows calling flows, one wait up to one hour, a flow timeout (default 5 minutes), 500 runs kept per plant, a function timeout (default 10 s).
  • Plant export contains functions, flows, buttons, displays (flow displays and the database displays of Section 10.13.1) and triggers; runs are not exported. Ids inside flows (functions, flows, machines, orders and SFCs chosen from a list) are mapped to the imported rows; other row ids typed by hand into a flow are copied unchanged and should be checked after an import.

10. Production Operator Dashboard

The Production Operator Dashboard is the central control and monitoring view during an active simulation. It provides a real-time view of all order processes in the plant, allows starting and stopping production per machine, and displays progress, queue status, and recent events.

Navigate to a plant → Production Operator Dashboard (top tab bar).

License requirement: The Production Operator Dashboard requires the productionOperatorDashboard entitlement.


10.1 Overview

An order process is the combination of a machine running a specific order at runtime. The dashboard is organized into three main sections:

  • Summary Cards: Display counts for In Progress, Pending, Recently Completed, and Total Orders
  • Running Orders: Currently executing order processes with live progress updates
  • Order Queue: Pending order processes waiting to be started
  • Recently Completed Orders: The last 5 completed orders with a link to view full history

The dashboard auto-refreshes every second to provide real-time updates on all order processes.

Collapsing sections: Quick Actions, Displays, Machine Controls, Running Orders and Order Queue can be folded away. Click the title of a section (the arrow next to it shows whether it is open) to collapse it to its title bar, and click it again to open it. Every section starts open, each one is collapsed on its own, and the dashboard keeps refreshing in the background. The state is not remembered: the sections are open again when you reopen the dashboard. While Displays is collapsed its tiles are not refreshed and its Add display button is hidden.


10.2 Running Orders Table

The Running Orders table shows order processes that are currently being executed. Each row displays:

Column Description
Order ID Unique identifier for the order
Machine The machine assigned to this order process
Scenario The scenario connected to that machine ("No scenario" when none is connected)
Machine State Live status badge reflecting ISA-95/PackML machine states
Order Name The name of the production order
Progress Progress bar with percentage, showing yield quantity vs. target quantity
Total Produced Total parts produced (good + scrap)
Good Parts Count of acceptable parts produced
Scrap Parts Count of rejected parts
Status Order status badge (IN_PROGRESS)
Last Updated Timestamp of the last update

Tip: The Machine Controls table (above) also offers a Complete Takt action per machine, letting you manually finish the current takt with your own yield/scrap counts instead of waiting for the takt timer — see Section 10.7.


10.3 Order Queue Table

The Order Queue table shows pending order processes that are waiting to be started. Each row displays:

Column Description
Queue Position Position in the queue (1 = next to run)
Order ID Unique identifier for the order
Machine The machine assigned to this order process
Scenario The scenario connected to that machine ("No scenario" when none is connected)
Machine State Live status badge reflecting ISA-95/PackML machine states
Order Name The name of the production order
Target Parts Total parts the order requires
Status Order status badge
Created Timestamp when the order process was created
Actions Remove button to take the order out of the queue; start it with Start Production (or Start Machine) in the Machine Controls table

10.4 Filtering

Use the machine filter multi-select dropdown in the header to choose which machines the dashboard shows. The Select all switch at the top of the list selects every machine of the plant in one click; switching it off again selects none (it also turns on by itself when you tick every machine by hand). When no machine is selected, no machines are listed — this keeps the dashboard readable in large plants with many machines. The selection is not remembered: pick the machines again each time you open the dashboard. Filtering does not stop or affect any running simulations — it changes only what is displayed.


10.5 Starting Production

The Machine Controls table lists each selected machine with its machine ID, name, connected scenario ("No scenario" when none is connected), current machine state and current alerts.

The Machine Controls table has seven buttons per machine. Each one is available only in the states where it does something:

Button Changes the machine Effect
Start Machine STOPPED or a down state → IDLE Starts the machine. With Auto-Start on, production begins at once with the queued (or a pending) order, so the machine shows EXECUTING right away. With Auto-Start off the machine stays IDLE; a machine in a down state is set to IDLE with its production halted.
Stop Machine any state → STOPPED Stops a running production (the SFC is paused, the order is pending again) and switches the machine off. Progress is kept.
Start Production IDLE → EXECUTING Runs the queued order of an IDLE machine and continues where it left off. Refused when the machine is not IDLE or when there is no order to produce.
Stop Production EXECUTING → IDLE Halts production (the running takt is aborted, the SFC is paused, the order is pending again). The machine stays IDLE — also with Auto-Start on — until you press Start Production or Start Machine.
Complete Takt no state change Manually finishes the current takt with your own yield/scrap counts instead of waiting for the takt timer; not available while the machine is in a down state — see Section 10.7.
Scheduled Down any state except Scheduled Down → SCHEDULED_DOWN Sets the machine into scheduled downtime; production pauses without stopping the simulation — see Section 10.6.
Unscheduled Down any state except Unscheduled Down → UNSCHEDULED_DOWN Sets the machine into unscheduled downtime; production pauses without stopping the simulation — see Section 10.6.

Automation buttons placed on machine rows appear in the same column, after these buttons (Section 10.12).

To produce an order:

  1. Ensure the machine has a scenario connected (Section 8.1).
  2. Queue an order on the machine (Load Order to Machine).
  3. With Auto-Start on (default) a machine that is IDLE starts by itself. With Auto-Start off, press Start Production; a STOPPED machine needs Start Machine first.
  4. The machine status changes to EXECUTING and the progress bar begins advancing with each takt.

Note: If a machine has no scenario connected, it stays STOPPED and its queued orders stay pending. With Auto-Start off the machine returns to IDLE after every finished order and waits for Start Production for the next one. The same four actions are available to flows and OPC UA methods (capabilities sim.start, sim.stop, sim.start_production, sim.stop_production) and to AI agents through the MCP server.


10.6 Stopping Production

Use Stop Production to halt production but keep the machine on (IDLE), or Stop Machine to switch the machine off (STOPPED). Progress already recorded is retained — you can start again later and production will continue from where it left off.

Down states: the Scheduled Down and Unscheduled Down buttons in the Machine Controls table set the machine into the respective down state manually — they are available in every machine state except while that same down state is already active. (A maintenance sets a down state automatically, see Section 7.10.) Scheduled Down and Unscheduled Down pause production without stopping the simulation: the order leaves Running Orders and is pending again, and the SFC is paused. Click Start Machine to resume (with Auto-Start off the machine becomes IDLE instead and waits for Start Production). A flow, OPC UA method or other external change that sets the machine to IDLE (the only way out of Unscheduled Down besides STOPPED) does the same. With Auto-Start on, a machine whose order is being produced always shows EXECUTING: an external IDLE does not stay IDLE while an order is queued and running. With Auto-Start off an external IDLE halts production and stays IDLE.

Reason codes: when reason codes are connected to a machine for the state a button leads to (Section 8.10), Scheduled Down, Unscheduled Down, Stop Machine, Start Production and Stop Production first ask for one: choose it and click Confirm, click Skip to go on without a reason, or close the dialog to cancel the action. Start Machine asks for a code of the state the machine will end in (Executing if the scenario auto-starts and an order waits, otherwise Idle); if the machine ends in another state the code is left out and the start still succeeds. Without connected codes the buttons act as before, with no extra click. The machine row shows the active reason next to its state, and Record State (Section 12.6) and the machine form (Edit Machine, next to the status) offer the same choice.


10.7 Manually Completing a Takt

By default a running machine finishes its current takt automatically once the configured takt time elapses. In some cases you may want to finish the current takt yourself instead — for example to synchronize the simulation with an external event, or to record a specific yield/scrap outcome.

To manually complete a takt:

  1. In the Machine Controls table on the dashboard, find the machine (not in a down state or in a running maintenance).
  2. Click Complete Takt.
  3. Machine running: the dialog shows how many parts the running takt has. Enter Yield and Scrap so that they add up to exactly that number, then confirm. Parts that already carry an NC code with a scrap disposition stay scrap, so Scrap cannot be lower than their number. If Mixed Yield/Scrap is off for the scenario, the takt is either all good or all scrap.
  4. Machine stopped: enter the Yield and Scrap quantities to book; they are booked as one manual takt on the current SFC (and, unless the scenario respects SFC boundaries, the queued SFCs). The machine stays stopped.
  5. The SFC’s yield/scrap counters update immediately, exactly as if the automatic takt timer had fired with that outcome — including advancing to the next SFC or completing the order if the SFC’s planned quantity is reached.

Note: Completing a running takt manually ends that takt early; the next takt starts right away (unless a Stop after… toggle (Section 7.2.1) pauses the machine). Events that were planned for the rest of the takt are dropped. A paused machine (maintenance or downtime) rejects a manual completion.

Recording an NC code on a part: Record NC Code on the dashboard asks for the SFC and the part the nonconformance occurred on (default: the last finished part). Only SFCs that are still in the machine’s queue are offered, and aborted parts are not listed. The Quantity is the number of parts that get the NC code: the selected part and the parts after it (continuing with the earlier parts if needed), at most the parts of the SFC; every part gets its own occurrence. When every part of the SFC carries a scrap NC code, the SFC is scrapped. An NC code with a scrap disposition scraps exactly that part; if the takt is still running, the part is scrapped when the takt ends (in a mixed-off scenario the whole takt is scrapped). In Overproduction mode scrapping a part of an already finished SFC creates a replacement SFC while the order is still running.


10.8 Deleting an Order Process

Click the Delete button next to a pending order process in the Order Queue table to remove it. You will be prompted to confirm the deletion.


10.9 Expanding an Order

Click the chevron next to any order row (running or pending) to expand it and see detailed information in two columns:

  • SFCs: All SFCs associated with this order, showing SFC number, yield quantity vs. planned quantity, unit of measure, last produced timestamp, and status badge
  • NC Codes: All nonconformance events logged for this order process, showing NC code, description, quantity, occurrence timestamp, and severity badge

10.10 Expanding a Machine

Click the chevron next to a machine in the Machine Controls table to expand its detail row. The expansion shows five panels with the machine’s events and recent history:

  • Alerts (the header shows total / acknowledged / active): the machine’s alert events with alert name, severity, message, occurrence time, acknowledgment status, clear time and duration. Click the checkmark to acknowledge an alert and the X to clear an active one; Record Alert logs a new alert manually. The complete history is in Section 12.2.
  • NC Code Occurrences: the machine’s nonconformance events with NC code, severity, SFC, disposition, quantity, occurrence time and comment. Record NC Code logs an occurrence manually (to record one on a specific part, see Section 10.7); entries can also be deleted individually. Complete history: Section 12.3.
  • Tool Usage Log: tool usage events with tool, SFC, quantity, occurrence time and comment, plus Record Usage and delete per entry. Complete history: Section 12.4.
  • Machine State Log: the machine’s state periods with state, reason code, trigger, start, duration and comment, plus Record State to add a period manually. Complete log: Section 12.6.
  • Recent takts: the machine’s latest takts with Id, source, status, planned duration, whether the takt is frozen, start time and a parts count — click a takt row to load its parts (summary of good / scrap / in-work parts).

The Event Logs (Chapter 12) hold the complete, unfiltered history of every log shown here.


10.11 Recently Completed Orders

The Recently Completed Orders section shows the last 5 completed orders across all machines in the plant. Each row shows the order ID, machine, order name, final count (produced vs. target), good parts, scrap parts, final status and completion time. This provides a quick at-a-glance overview of recent production results. Click View All History to navigate to the Order History page (Section 12.1) for complete historical data.

Replaying an order: every row has a Replay button that puts the order back into the queue of the machine it ran on, so you can run it again. The order reappears in the Order Queue (Section 10.3) and starts according to that machine’s scenario (e.g. automatically with Auto-Start on). While a replay is running, the button shows a spinner and is disabled. The same rules as for manually loading an order apply (Section 8.2) — for example the order must not already be queued on another machine; if it is, an error is shown in the banner at the top of the dashboard.


10.12 Quick Actions and Machine Buttons

Automation buttons appear on the dashboard:

  • Quick Actions: a card below the summary cards with the enabled buttons placed on the dashboard. The card is hidden when there are none.
  • Machine buttons: buttons placed on machine rows appear in the Actions column of Machine Controls, after Unscheduled Down, for the machines they are limited to.

Pressing a button starts its flow. Buttons that ask for inputs or a confirmation open a dialog first. While the run is going the button shows a spinner and is disabled; when it succeeds a check mark replaces the icon for 3 seconds. A failed, cancelled or skipped run is reported in the error banner at the top of the dashboard. Follow the details in Event Logs → Automation Run Log (Section 9.6).


10.13 Displays

Displays show a value on the dashboard. Automation displays show the output of a flow; database displays show a value read from the database and are added on the dashboard itself:

  • Displays card: below Quick Actions, one tile per enabled flow display placed on the dashboard, with its label and value (with the unit when it shows a single output, otherwise one name: value line per output), followed by the tiles of the database displays. The card is always shown: with no display it says No displays yet, and its Add display button adds a database display.
  • Machine displays: displays placed on machine rows appear under the machine name in Machine Controls, for the machines they are limited to, as label: value.

A live display evaluates its flow when the dashboard opens and then every Refresh every seconds; the refresh button on a tile (and on machine displays set to refresh on demand) updates it at once. A display that updates When the flow runs shows the output of the flow’s last run (also after the dashboard is reopened), reads No run yet before the first run, picks up a newer run within a couple of seconds and has no refresh button; its tile is titled Flow name – Display name. A failing flow or run shows Error (the card shows the message). A display never changes data and is not recorded in the Run Log.

10.13.1 Database Displays

A database display shows one value read straight from the database, for example the number of machines in a plant, the status of one machine or the latest value of a column. It needs no flow. It uses the same Database Reference builder as OPC UA nodes and MQTT topics (Section 14.3), so everything the builder offers works here: filters, JOINs, sorting, a limit, an aggregation such as COUNT or MAX, and a prefix, suffix and default value.

To add a database display:

  1. On the Production Operator Dashboard click Add display in the Displays card.
  2. Enter a Label and, if you like, a Unit (shown after the value, e.g. pcs).
  3. Set Refresh every (milliseconds): how often the tile reads the value again (default 5000, from 100 to 3,600,000; 1000 is once per second). The tile refreshes itself, there is no refresh button.
  4. Under Database value pick the Base Table, optionally add JOINs and Filter Conditions (e.g. name = Press 1) and, under Sorting, Limit & Aggregation, an aggregation. Choose the Final value column (or click a column header in the row preview). The Live Preview shows what the display will read.
  5. Click Create Display.

Each tile shows its label, the value (with the unit) and two small buttons: Edit (reopens the dialog on the stored query) and Delete (asks for confirmation). A query that returns nothing shows – (or the Default Value of the query). The value follows the database: it is read again at every refresh interval, nothing is cached. The dialog fits the window even for a large table: the row preview scrolls inside its own box, and the title and the Cancel / Create Display buttons stay in view while the form scrolls.

When you save, the query is run once; a table or column that does not exist, or a filter that cannot work, is refused with the reason and nothing is saved. If the query stops working later (for example a column is removed), the tile shows the error in red where the value would be. Without a limit a query reads one row, so a refresh never loads a whole table. Only tables with your own data are offered, and accounts and licensing can never be shown. A database display only reads: it never changes data. Database displays are placed on the dashboard card only (not on machine rows), belong to the plant, are part of the plant export and are removed with the plant.


11. Database Viewer

The DB Viewer shows the plant’s database tables read-only — useful to see what MaConSim actually stores, for example when you build a Database Reference query (Section 14.3).

Navigate to a plant → DB Viewer (tab in the plant navigation, directly before Event Logs). Like every plant tab, it can also be opened in its own window (Section 6.2).

Browsing tables:

  1. Pick a Table from the dropdown. The list shows all tables of your data, sorted alphabetically. Internal system tables are not listed.
  2. The table below the dropdown shows the table’s rows in a scrollable list. Each column header shows the column name with its data type (e.g. machine_name (String)) and has a filter input — type into it to keep only the rows whose value contains the text. Empty (null) values are shown in italics.
  3. Use the first / last buttons above the table to list the oldest rows first or the newest rows first.

The viewer is read-only: it never changes data. The same viewer also opens in its own popup window from the Preview rows of tables panels of the query builder, with the table preselected — see Section 14.3.3.


12. Event Logs

The Event Logs provide a permanent record of all production activity in the plant. Unlike the dashboard (which shows live and recent data), the Event Logs store the full history for the life of the plant and can be used for quality reporting and process analysis.

Navigate to a plant → Event Logs.

The Event Logs section contains these main areas:

  • Order History: Complete log of all completed production orders
  • Alert History: Record of all alert events with management capabilities
  • NC Code Occurrences: Tracking of all nonconformance events
  • Data Collection Log: Every value set on a machine’s data collection (see Section 12.7)
  • Automation Run Log: Every run of an automation flow, what started it and what it did (see Section 9.6)

Each log provides detailed views of historical production activity.


12.1 Order History

Navigate to a plant → Event Logs → Order History.

The Order History displays a complete log of all completed production orders with archived SFC snapshots. The main table shows:

Column Description
Order ID Unique identifier for the order
Order Name The name of the production order
Machine The machine on which the order was processed
Target Target quantity for the order
Total Produced Total parts produced (good + scrap)
Good Parts Count of acceptable parts produced
Scrap Count of rejected parts (highlighted in red if > 0)
Status Final order status badge (e.g., COMPLETED, CANCELLED)
Completed Timestamp when the order was completed
Actions Delete button to remove history entry

Expanded Order Details: Click the chevron next to any order to expand it and see:

  • Summary Cards: Yield percentage, Cycle Time, Number of SFCs, Good Parts count. The cycle time is the average production time per part in seconds (sum of the automatic takt durations divided by the parts they produced; time spent in maintenance or paused is not included). It shows - when no automatic takt was booked, e.g. for an order that was only booked manually.
  • Scrap Reasons: shown when parts were scrapped. For each NC code with a scrap disposition, the number of scrap parts it caused (a part with two such NC codes counts under both). Scrap without such an NC code, for example parts written off with the Scrap button, is listed as unspecified.
  • SFC Snapshots at Completion: Detailed table showing each SFC’s state at order completion:
    • SFC Number (with replacement indicator for rework SFCs)
    • Material
    • Status badge
    • Planned quantity
    • Yield quantity
    • Scrap quantity
    • Current step / Total steps
    • Started: Timestamp when this SFC was started
    • Completed: Timestamp when this SFC was completed

Additional Feature:

  • Delete individual history entries with confirmation

License requirement: Requires the orderHistory entitlement.


12.2 Alert History

Navigate to a plant → Event Logs → Alert History.

The Alert History shows all alert events triggered during simulation with management capabilities. The main table displays:

Column Description
Alert Alert name and optional message
Machine The machine that generated the alert
Severity Severity level badge (Low, Medium, High, Critical)
Occurred Timestamp when the alert was triggered
Duration How long the alert was active (or "Active" badge if still open)
Status Acknowledged or Unacknowledged badge
Actions Acknowledge, Clear, Delete buttons

Additional Features:

  • Record Alert: Click the "Record Alert" button to manually log a new alert occurrence
    • Select Alert type from existing alerts
    • Select Machine
    • Set Severity level
    • Add optional message
  • Alert Management Actions:
    • Acknowledge: Mark an unacknowledged alert as acknowledged
    • Clear Alert: Clear an active alert
    • Delete: Remove alert history entry permanently
  • Empty state message when no alerts exist
  • Error handling with dismissible alerts

Use the alert history to analyze the frequency and distribution of machine alerts over time, validate scenario parameters, and ensure alerts are properly acknowledged and cleared.

License requirement: Requires the alertHistory entitlement.


12.3 NC Code Occurrences

Navigate to a plant → Event Logs → NC Code Occurrences.

The NC Code Occurrences log tracks all nonconformance events with recording capabilities. The main table displays:

Column Description
NC Code Nonconformance code with description
Machine The machine on which the event occurred
SFC The SFC on which the event occurred
Severity Severity level badge (Minor, Major, Critical)
Quantity Number of defective parts for this occurrence
Occurred Timestamp when the nonconformance was logged
Comment Optional notes about the occurrence
Actions Delete button to remove the entry

Additional Features:

  • Record NC Code Occurrence: Click the "Record Occurrence" button to manually log a new nonconformance event
    • Select NC Code from existing codes
    • Select Machine
    • Optionally select an SFC (only SFCs in the machine’s queue) and the part; the quantity is the number of parts that get the NC code (minimum 1, at most the parts of the SFC)
    • Add optional comment
  • Delete individual occurrence entries with confirmation
  • Empty state message when no NC code occurrences exist
  • Error handling with dismissible alerts

Use the NC code log to identify which defect types occur most frequently, on which machines, and correlated with which orders — supporting quality analysis and process improvement.

License requirement: Requires the ncCodeHistory entitlement.


12.4 Tool Usage Log

Navigate to a plant → Event Logs → Tool Usage Log.

The Tool Usage Log tracks all tool usage events across machines with manual recording capabilities. The main table displays:

Column Description
Id Unique identifier for the log entry
Tool Name of the tool used
Machine The machine where the tool was used
SFC The SFC number associated with the usage, if any
Quantity How many times the tool was used in this event
Occurred Timestamp when the usage was logged
Comment Optional notes about the usage event
Actions Delete button to remove the entry

Additional Features:

  • Record Tool Usage: Click the "Record Usage" button to manually log a new tool usage event
    • Select Tool from existing tools
    • Select Machine from existing machines
    • Set Quantity (minimum 1)
    • Add optional comment
  • Delete individual tool usage entries with confirmation
  • Empty state message when no tool usage entries exist
  • Error handling with dismissible alerts

Use the tool usage log to track tool consumption, maintenance schedules, and correlate tool wear with quality issues.


12.5 Maintenance History

Navigate to a plant → Event Logs → Maintenance History.

Every maintenance that ran on a machine is listed with its start, end, duration, down state and how it ended: Auto (the configured duration elapsed), Operator (resumed with Start Machine) or Stop (the machine was stopped or the application restarted); a maintenance that is still running shows Running.


12.6 Machine State Log

Navigate to a plant → Event Logs → Machine State Log.

The log lists every period in which a machine was in a state (STOPPED, IDLE, EXECUTING, SCHEDULED_DOWN, UNSCHEDULED_DOWN) with its reason code (code and name, empty when none was given; Section 7.11), start, end, duration, trigger (automatic, manual or external) and comment. Status changes made while the simulation runs are logged automatically. The reason code column can be filtered; a row keeps its reason code even after the reason code was deleted.

Recording a period manually: expand a machine on the Production Operator Dashboard, open its Machine State Log panel and click Record State. Choose the State and Trigger (and, when reason codes are connected to the machine for that state, a Reason code; it is reset when you change the state), then enter the period: either a Start and End time, or a Start time and a Duration (minutes) — changing the duration updates the end time. The dialog suggests the last hour. The end must be after the start; Record stays disabled until it is. A manually recorded entry is always a closed period, and it does not change the actual machine state.


12.7 Data Collection Log

Navigate to a plant → Event Logs → Data Collection Log.

The log lists every value that was set on a machine’s data collection (see Section 8.4), newest first, up to the latest 1000 entries. Entries are written automatically by every save of a value, whether it was made in the UI, by a flow or function, or by an AI agent; they are never edited or removed by hand (they disappear only with their machine or data collection). The table shows:

Column Description
Id Unique identifier of the log entry
Machine The machine the value belongs to
Data Collection The data collection the value belongs to
Old value The value before (a dash when there was none), with the data collection’s unit
New value The value that was set (a dash when it was cleared), with the unit
Changed When the value was set

Use the search box to narrow the list; click a column header to sort. Setting a value to the value it already has is logged too (old and new value are then equal). The log is also the database table machine_data_collection_value_log, so it can be used as a database reference or as the source of an automation trigger.


13. Connectivity

Navigate to a plant → Connectivity to configure OPC UA and MQTT integrations with external systems.


13.1 OPC UA

MaConSim includes an embedded OPC UA server that can expose machine simulation data to external MES/SCADA/DCS systems.

Navigate to a plant → Connectivity → OPC UA to access the OPC UA Tree Management interface.

13.1.1 Creating an OPC UA Tree

The OPC UA Tree Management interface displays all existing OPC UA trees in a table view with their configuration and security status.

To create a new OPC UA tree:

  1. Click Add OPC UA Tree.
  2. Configure the tree settings in the dialog:
Field Description Default
Name Display name for the tree —
Server Address Hostname or IP address to bind the server to localhost
Server Port TCP port number for the OPC UA server 4840
Description Optional description of the tree’s purpose —
  1. Security Configuration (expandable section):
Field Description Default
Security Mode Message security level None
Security Policy Cryptographic algorithm (dropdown appears only when Security Mode ≠ None) None
User Authentication Authentication method for clients (single-selection radio buttons) Anonymous
Username Required when User Authentication = Username/Password —
Password Required when User Authentication = Username/Password —

UI Behavior Notes:

  • User Authentication uses single-selection radio buttons — only one authentication method can be active at a time
  • Security Policy dropdown automatically appears when Security Mode is set to Sign or SignAndEncrypt
  • When Security Mode is changed to None, the Security Policy automatically resets to None
  • For existing trees with Username authentication, a "View Current" button allows viewing stored credentials

Security Mode Options:

  • None – No security, messages sent in plain text
  • Sign – Messages are signed but not encrypted
  • SignAndEncrypt – Messages are signed and encrypted (recommended for production)

Security Policy Options:

  • None – No cryptographic security
  • Basic128Rsa15 – Legacy (DEPRECATED since OPC UA 1.04)
  • Basic256 – Legacy (DEPRECATED since OPC UA 1.04)
  • Basic256Sha256 – Compatible with older clients
  • Aes128Sha256RsaOaep – Modern, good performance (recommended)
  • Aes256Sha256RsaPss – Highest security level

User Authentication Options:

  • Anonymous – No authentication required
  • UserName – Authenticate with username and password
  • Certificate – Authenticate with X.509 certificate
  • IssuedToken – Authenticate with OAuth/JWT token
  1. Click Create to save the tree.

Note: When selecting Certificate authentication, you can upload trusted client certificates (.der, .pem, .crt, or .cer files) and manage the trusted certificate list directly in the tree creation dialog.

13.1.2 OPC UA Tree Management

Important: Any changes to OPC UA tree configurations or nodes require the server to be stopped first. Before editing a tree configuration, adding, editing, or deleting nodes: stop the server using the Stop button, make your changes, then restart the server using the Play button for the changes to take effect.

The OPC UA Tree Management table displays all trees with the following columns:

Column Description
Name Tree name with optional description shown below
Server Address Hostname or IP address and port (e.g., localhost:4840)
Security Color-coded badge indicating security mode: 🟡 Yellow "No Security" for None mode, 🟢 Green "Encrypted" with 🔒 icon for SignAndEncrypt mode, 🔵 Blue "Signed" with 🛡️ icon for Sign mode
User Auth User token types configured (e.g., Anonymous, UserName, Certificate, IssuedToken) displayed as comma-separated text
Created Date when the tree was created
Actions Server control and management buttons

Table Features:

  • Click any tree row to enter its Node Management view
  • Hover over security badges to see the security mode details
  • User token types are displayed directly in the table for quick reference

Actions available for each tree (6 action buttons):

Action Icon Description
Start/Stop Server ▶️⏹️ Play button starts the OPC UA server, Stop button stops it
Edit ✏️ Modify tree configuration, security settings, or authentication credentials
Export NodeSet2 XML 📥 Download button to export the tree as NodeSet2 XML file
Import NodeSet2 XML 📤 Upload button to import a NodeSet2 XML file (replaces existing nodes)
Copy Tree 📋 Duplicate the tree with a new name (creates a copy with "(Copy)" suffix)
Delete 🗑️ Remove the tree and all its nodes (with confirmation dialog)

Starting and Stopping Servers:

  • Click Play on an OPC UA tree to start the server
  • Click Stop to stop it
  • Server state is indicated by color-coded badges:
    • Yellow "No Security" badge for unsecured servers
    • Green "Encrypted" badge for SignAndEncrypt mode
    • Blue "Signed" badge for Sign mode
  • Port Conflict Detection: The system automatically checks if the port is already in use by another running server and prevents starting with an error message showing which tree is using the port
  • Success and error messages are displayed temporarily when starting/stopping servers

Editing Trees:

  • Click the Edit button to modify any tree configuration
  • Change basic settings, security configuration, or authentication credentials
  • For trees with username authentication, you can view current credentials using the "View Current" button

Tree Navigation:

  • Click on any tree row to enter the node management view for that tree
  • Use the back arrow to return to the tree list

13.1.3 NodeSet2 Import and Export

Import NodeSet2 XML: You can import an OPC UA NodeSet2 XML file to pre-populate the node tree:

  1. Click Import NodeSet2 button on an OPC UA tree from the tree list
  2. Confirm the action (importing will replace the tree’s current nodes and references)
  3. Select the .xml file from your file system
  4. The import summary will show the number of nodes created, references created, and namespace URIs processed

Export NodeSet2 XML:

  1. Click Export NodeSet2 button on an OPC UA tree from the tree list
  2. A save dialog will appear with a suggested filename based on the tree name
  3. Choose the destination and save the .xml file
  4. A success message will confirm the export location

13.1.4 Certificate Management

When using Sign or SignAndEncrypt security modes, certificates are managed automatically.

Certificate Storage:

  • On Windows: C:\Users\{username}\AppData\Roaming\com.maconsim.app\pki\
  • Certificate files are stored with extensions: .der, .pem, .crt, or .cer

Managing Trusted Certificates: When creating or editing a tree with Certificate authentication, the X.509 Certificate Authentication section appears with the following features:

  1. Upload Client Certificate:

    • Click the file input or drag-and-drop a certificate file
    • Supported formats: .der, .pem, .crt, .cer
    • Invalid file types trigger an error message
    • Uploaded certificates appear in the Trusted Certificates list
    • A loading spinner indicates upload progress
  2. Trusted Certificates List:

    • Displays all currently trusted certificate filenames in a scrollable list
    • Each certificate filename is shown in monospace font for clarity
    • Each certificate can be deleted individually using the Delete button
    • Deleting a certificate removes it from the trusted store
    • The list updates automatically after upload or deletion

UI Indicators:

  • Loading state shown while certificates are being loaded
  • Success messages confirm successful uploads and deletions

Note: Server certificates are generated automatically when using security modes other than None.

License requirement: OPC UA functionality requires the opcUaServer or opcUaClient entitlement.

13.1.5 OPC UA Node Management

After creating an OPC UA tree, click on it to access the Node Management interface. This displays the tree structure with all nodes and allows you to add, edit, and organize nodes.

Node Management Interface Features:

  • Tree View: Hierarchical display of all nodes with expand/collapse controls
  • Live Value Display: Variable nodes show their current values with live/static indicators
  • Node Type Indicators: Objects (📦), Variables (🔢), Methods (⚙️), Views (👁️) with color coding
  • Simulation Badges: Variables with simulation configs show their simulation mode
  • Server Controls: Start/Stop server buttons are available in the node view
  • Chart Preview: For simulation variables, a Live Chart button appears for real-time visualization

View Switcher Tabs: MaConSim provides two different views for managing OPC UA nodes:

Tab Icon Purpose
Instances 🌳 (GitBranch) Manage the actual node instances in your OPC UA address space. This is where you create and organize Objects, Variables, Methods, and Views that represent your machine data and hierarchy.
Type Definitions 📦 (Box) Manage the OPC UA type system (ObjectTypes, VariableTypes, DataTypes, ReferenceTypes). Use this to define reusable type definitions that can be instantiated in the Instances view.

When to use each view:

  • Instances: For creating your actual production data model (machines, sensors, status variables, etc.)
  • Type Definitions: For creating custom types that can be reused across multiple instances (e.g., a "MachineType" that defines a standard machine structure)

Tree Navigation:

  • Click the chevron buttons (▶️/▼) to expand or collapse individual nodes
  • Use Expand All and Collapse All buttons to control tree visibility for the entire hierarchy
  • Hover over nodes to see additional actions (Add Child, Edit, Delete, etc.)
  • Node icons help identify node types at a glance

13.1.5.1 Adding Nodes

To add a root node (for empty trees):

  1. Click Add Node button
  2. The system automatically selects Object type for root nodes

To add a child node:

  1. Navigate to the parent node in the tree
  2. Hover over the parent node to reveal the Add Child button
  3. Click Add Child or click Add Node for a root-level node

Node Creation Dialog:

  1. Select Node Type (required):

    • Object: Container node for hierarchical organization (e.g., machines, subsystems)
    • Variable: Data value node that OPC UA clients can read/subscribe to
    • Method: Executable function node that clients can invoke
    • View: Visual organization node for grouping related nodes in the address space
  2. Basic Node Information:

    • Namespace: Numeric namespace identifier (default: 2)
    • Identifier Type: NodeId identifier type. Available options:
    Type Label Description
    s String String identifier (e.g., MyNode) — default
    i Numeric Numeric identifier (e.g., 12345)
    g GUID GUID identifier (e.g., {6B29308F-...})
    b ByteString ByteString identifier (Base64 encoded)
    • Identifier: Unique identifier within the namespace (required)
    • Browse Name: Programmatic name used for browsing (required)
    • Display Name: Human-readable name (optional)
    • Description: Optional node description
    • Node Class: OPC UA node class (auto-populated based on type)
  3. For Variable Nodes:

    • Data Type: Select from available OPC UA data types (String, Int32, Int64, Float, Double, Boolean, DateTime, ByteString)
    • Access Level: Read Only, Write Only, or Read/Write permissions
    • Engineering Units (only shown for the numeric types Int32, Int64, Float, Double): the unit of measurement of the value, e.g. °C, bar, rpm — pick a common unit from the grouped list or type your own
    • EU Range Low / EU Range High (only shown for numeric types): optional lower and upper limit of the value’s valid range, published to OPC UA clients as the analog item range
    • Value Precision (only shown for Float, Double and DateTime): how precisely the value is represented. For Float/Double it is the number of digits after the decimal place (a negative value rounds to a power of ten, e.g. -2 rounds to the nearest 100); for DateTime it is the resolution in nanoseconds. The live value display in the tree applies this precision to Float/Double values — see Section 13.1.5.5
    • Update Interval: Polling interval in milliseconds (default: 1000ms)
  4. For Method Nodes:

    • Executable: Enable/disable method execution
    • User Executable: User-specific execution permissions
    • Implementation: Pick the saved Python function the method runs, or create one with New function…. Without a function the method is declared only.
    • See Method Configuration below for detailed instructions on creating method nodes

13.1.5.2 Data Source Configuration

For detailed instructions on data source configuration, see Section 14. The same data source types and configuration options are available for both OPC UA and MQTT connectivity.

13.1.5.3 Method Configuration

A Method node runs a Python function: a reusable, plant-wide unit with typed inputs and outputs that is written either as a Python script or as a low-code flow. Functions are managed under Automation → Functions (Section 9.3); the same function can implement several methods.

Implementation section of the node form:

  • Executable / User Executable: Enable method execution. A new method becomes executable as soon as you pick a function; a saved method keeps its flags.
  • Python function: Choose one of the plant’s functions. The list shows each function with its signature.
  • New function…: Opens the function editor (name prefilled from the method’s browse name). The saved function is linked automatically.
  • Edit function…: Opens the linked function. A warning tells how many OPC UA methods and flows use it. Restart the OPC UA server to apply changes to a function a running server already uses.
  • Unlink: Removes the implementation; the method becomes declared only.
  • Signature preview: Shows the inputs and outputs the OPC UA client sees. They come from the function’s signature.

Declared-only methods: A method without a function (for example one imported from a NodeSet2 file) is still visible to OPC UA clients, but calls return BadNotImplemented. The form shows the imported input/output arguments read-only.

Python runtime: Python scripts run in the embedded sandbox when it is present (installed builds and the Docker image bundle it; no Python installation is needed). Otherwise they need Python 3.8 or newer in your PATH (or set in the MES_PYTHON environment variable). Without either the Python Script source is disabled and the editor explains why; low-code functions can still be saved and linked. Functions have a timeout (default 10 s); a script that runs longer is stopped.

Testing methods without starting a server:

  1. In the OPC UA Node Management tree, click the Play button next to a method that has a function.
  2. Enter the input values (typed fields; ids can be picked from a list).
  3. Click Test (no changes) to run the function as a dry run: read operations execute, every change is only listed ("Would have run …").
  4. Click Run and confirm to execute the function for real, exactly as an OPC UA client call would.

Note: The test is a true dry run. Mutating capabilities (such as setting a machine status or loading an order) are never executed during Test (no changes); their results are placeholders, which can change the path of a function that branches on them.

13.1.5.4 Node References

Node references define how nodes are linked in the OPC UA address space for browsing and semantic structure.

Available Reference Types:

  • Organizes: Hierarchical organization relationship
  • HasComponent: Functional component relationship (common for machine parts)
  • HasProperty: Property/attribute relationship (common for metadata)
  • HasTypeDefinition: Type definition relationship
  • HasSubtype: Inheritance relationship
  • HasModellingRule: Modelling rule relationship
  • HasEncoding: Encoding relationship
  • HasDescription: Description relationship
  • GeneratesEvent: Event generation relationship

Reference Behavior:

  • Hierarchical references (Organizes, HasComponent, HasProperty) create parent-child relationships in the tree view
  • Non-hierarchical references describe semantic relationships without affecting tree position
  • When adding a child node under a parent, MaConSim automatically creates a HasComponent reference
  • References can be customized to reflect your modeling intent

Practical Guidelines:

  • Use Object nodes with Organizes or HasComponent to structure systems and subsystems
  • Use Variable nodes with HasComponent for operational signals or HasProperty for descriptive attributes
  • Use Method nodes with HasComponent when they belong to a specific subsystem

13.1.5.5 Live Value Display and Monitoring

Live Value Indicators:

  • Variable nodes display their current values in the tree
  • Values are color-coded:
    • Green badge: Live value from running OPC UA server
    • Amber badge: Static value (server not running or value not updated)
  • For Float/Double nodes with a Value Precision set (Section 13.1.5.1), the displayed value is rounded to that precision (digits after the decimal place; a negative precision rounds to a power of ten)
  • Values are truncated if longer than 20 characters (hover to see full value)
  • An indicator shows whether the value is live or static

Real-time Value Updates:

  • The UI updates node values every second to display current data
  • Live values are read directly from the running OPC UA server’s address space
  • When the server is stopped, values fall back to the database-stored current value
  • Database-referenced and simulation nodes update automatically when their source data changes

Chart Preview:

  • For simulation variables with supported modes (sine, sawtooth, random), a chart button appears
  • Click the Live Chart button to open a real-time visualization
  • Chart shows value changes over a configurable time window (default: 60 seconds)

13.1.5.6 Editing and Deleting Nodes

Editing Nodes:

  1. Click the Edit button next to any node to edit its properties
  2. Modify any node configuration (type, identifiers, data source, etc.)
  3. For database references, changing the table/row/column will update the data source
  4. Click Save to apply changes and refresh the tree

Deleting Nodes:

  1. Click the Delete button next to any node
  2. The node and all its children will be deleted permanently
  3. Deletion cannot be undone

13.1.5.7 Typical Use Cases

Expose Machine Status:

  1. Add an Object node for the machine
  2. Add Variable nodes for each status aspect (Running, Idle, Error)
  3. Set data source to Database Reference and link to machine status fields
  4. Use Boolean data type for status flags

Publish Sensor Data:

  1. Add Object nodes to organize sensors by type or location
  2. Add Variable nodes for each sensor reading
  3. Set data source to Database Reference and link to data collection channels
  4. Configure appropriate data types (Float for temperatures, Int32 for counts, etc.)
  5. Set units for better client interpretation

Simulate Dynamic Data:

  1. Add Variable nodes for dynamic values
  2. Set data source to Simulation
  3. Choose simulation mode (sine for oscillating values, random for variable data, etc.)
  4. Configure simulation parameters (min/max values, frequency, etc.)
  5. Monitor values in real-time using the live chart

Organize Complex Systems:

  1. Use Object nodes to create a hierarchical structure matching your plant
  2. Group related variables and methods under appropriate parent objects
  3. Use meaningful reference types to indicate relationships
  4. Set descriptive display names and descriptions for all nodes

Create Custom Actions:

  1. Add Method nodes to expose custom functionality
  2. Use Python methods for complex logic or calculations
  3. Use method templates for predefined common operations
  4. Configure input/output arguments as needed
  5. Test methods using the built-in test execution feature

13.2 MQTT

MaConSim can publish machine simulation data to MQTT brokers.

Navigate to a plant → Connectivity → MQTT.

13.2.1 Creating a Broker Tree

  1. Click Add Broker Tree.
  2. Configure:
Field Description Default
Name Display name of the broker tree —
Description Optional notes for this broker tree —
Broker Host Broker hostname or IP address localhost
Broker Port MQTT TCP port 1883
WebSocket Port Optional MQTT-over-WebSocket port —
Username / Password Optional login credentials —
Client ID MQTT client identifier used by MaConSim Auto-generated (mqtt-client-${timestamp})
Keep Alive (seconds) Keep-alive interval for the client connection 60
Max Buffer Size Internal message buffer size 10000
Max Connections Maximum concurrent connections 1000
Birth Topic / Birth Message Optional online-status publish message when connecting —
Last Will Topic / Last Will Message Optional offline-status message if the client disconnects unexpectedly —
Authentication Toggle to require username/password auth Off
TLS/SSL Enable encrypted MQTT connections Off
Enabled Enable/disable this broker tree configuration On
  1. Click Add Broker Tree.

13.2.2 Starting and Stopping a Broker Tree

  • Click Play to start the broker runtime.
  • Click Stop to stop it.
  • The broker row and detail view show a Running/Stopped state badge.
  • In the topic tree view, use the Start Broker/Stop Broker buttons to control the broker state.

13.2.3 Topic Tree and Add Topic Configuration

After creating a broker tree, open it to manage the Broker Topic Tree. Topics are shown as a hierarchical tree derived from slash-separated topic paths, with folder indicators for parent nodes and signal-type indicators for leaf topics.

You can add topics from:

  • The main Add Topic button,
  • A folder node (Add Topic under a path prefix),
  • A leaf node (Add to create a sibling topic).
  • Topics can be organized in a hierarchical folder structure using slash-separated paths.

Add Topic Configuration:

  1. Open a broker tree.
  2. Click Add Topic.
  3. Configure the topic with the following fields:
Field Description Default
Topic Path Full MQTT topic path (slash-separated) —
Signal Type Message category (status, telemetry, event, alarm, metrics, command) telemetry
QoS Level MQTT QoS level (0, 1, 2) 1
Publish Interval (ms) Publish cadence for this topic 1000
Retain Message Broker retains the last message for new subscribers Off
Enabled Topic active/inactive state On
  1. Optionally configure an inline data source directly in the topic dialog using the embedded data source selector.
  2. Click Create Topic.

Topic path conventions:

MQTT topic paths are slash-separated strings. A common convention for machine data is:

{plant}/{machine}/{data-channel}

For example:

  • factory-berlin/press-1/spindle-temperature
  • site-a/cnc-3/vibration-level

Each topic must be a fully specified path. Use path segments to build a clear hierarchy.

Topics can be removed via the topic row action (Delete topic).

13.2.3.1 Live Value Monitoring

MaConSim provides real-time monitoring of MQTT topic values:

  • Live Value Updates: The UI updates topic values every 2 seconds to display current data
  • Visual Indicators: Current field values are displayed in the topic tree as badges showing the field count and values
  • Simulation vs Static: Simulation-based values show green indicators, while static/database values show blue indicators
  • Multi-field Display: Topics with multiple data sources show the total field count and first field value with a tooltip showing all field values
  • Status Badges: Each topic displays its signal type, QoS level, retain status, and enabled/disabled state

13.2.4 Data Source Configuration

For detailed instructions on configuring data sources, see Section 14. This section applies to both OPC UA and MQTT connectivity.


14. Data Source Configuration

The Data Source Configuration system provides the foundation for connecting MaConSim simulation data to external systems via OPC UA and MQTT. This chapter documents the shared configuration options available for both connectivity types, with a focus on the comprehensive Database Reference capabilities including JOIN functionality.

Note: The same data source types and configuration options are available for both OPC UA Variable nodes (Section 13.1.5.2) and MQTT topics (Section 13.2.4).

14.1 Overview

Data sources define where the values for OPC UA variables or MQTT topic fields come from. MaConSim supports three fundamental data source types:

  • Static Value: Fixed values that remain constant until manually changed
  • Database Reference: Dynamic values linked to real-time data from the MaConSim database
  • Simulation: Dynamically generated values using various simulation modes (sine, random, etc.)

The Database Reference type offers the most flexibility and power, allowing you to create complex queries with JOINs, filters, sorting, and aggregation to extract exactly the data you need from your plant database.

14.2 Data Source Types

Type Description Best For
Static Value Set a fixed value that remains constant until manually changed Configuration constants, test values, or values that rarely change
Database Reference Link to real-time data from the MaConSim database with full SQL query capabilities Dynamic machine data, order information, event logs, or any database-stored values
Simulation Dynamically generate values using simulation configurations (sine, sawtooth, random, etc.) Testing, demonstrations, or simulating sensor data without actual database entries

For Variable nodes in OPC UA, the data source type is configured via the Value Source dropdown. For MQTT topics, each field within a topic has its own Source Type configuration.

14.3 Database Reference Configuration

The Database Reference configuration provides a visual query builder that allows you to create sophisticated database queries without writing SQL manually. The configuration interface is organized in a specific order that follows the natural flow of building a query.

14.3.1 Table and Column Selection (UI Position 1)

The first step in building a database reference query is selecting the source data.

Table Selection:

  • Choose from all available database tables in the Table dropdown
  • Internal system tables are not offered (for example account, licensing, connectivity or automation internals)
  • The connection tables between a machine and alerts, NC codes, tools, data collections and scenarios (for example machine_alerts with its probability, or machine_data_collections with the current value) are offered, so you can read a connection’s own value or JOIN through it without a helper variable. They have no id column: filter on machine_id and the other id instead. A value cannot be written back to such a table from an OPC UA client or MQTT

Column Selection:

  • After selecting a table, choose a specific column from the Column dropdown
  • Each column entry displays the column name and its data type (e.g., machine_name (String))
  • Only columns from the selected table are available

14.3.2 JOIN Configuration (UI Position 2)

The JOIN Configuration allows you to combine data from multiple tables to create comprehensive queries that span across different entities in your plant.

Adding JOINs:

  1. Expand the JOINs section by clicking the JOINs button
  2. Click Add JOIN to add your first join condition
  3. Up to 4 JOINs can be configured per query

JOIN Types:

Type Description Typical Use Case
INNER JOIN Returns only rows that have matching values in both tables Finding machines with active orders
LEFT JOIN Returns all rows from the left table, and matched rows from the right table (or NULL if no match) Including all machines regardless of order status
RIGHT JOIN Returns all rows from the right table, and matched rows from the left table Finding all orders and their machine assignments

ON Condition Builder: The visual builder provides an intuitive interface for creating JOIN conditions:

  1. Left Table/Column: Select the column from your primary or previously joined table
  2. Operator: Choose the comparison operator (typically = for JOINs)
  3. Right Table/Column: Select the column from the table you are joining

The builder uses dropdowns for table and column selection, ensuring only valid combinations are available.

Table Aliases:

  • Optionally assign a short alias to each joined table
  • Aliases make queries more readable and manageable
  • When configured, column references in the query will use the format alias.column instead of table.column
  • Example: Join the orders table with alias o → columns become o.order_name, o.target_quantity

Column Selection with JOINs:

  • After adding JOINs, the Column dropdown includes entries from all joined tables
  • Columns are displayed in table.column format (or alias.column if aliases are defined)
  • This allows you to select values from any table in your JOIN chain

Example JOIN Configuration: To create a query that gets the alert name of an alert, that occured on a specific machine:

  1. Select primary table: alerts
  2. Select column: name
  3. Add JOIN: INNER JOIN with alert_history table
  4. ON Condition: machines.id = alert_history.alert_id

You now have access to the alert names of the alerts that occured.

14.3.3 Preview Rows of Tables (UI Position 3)

The Preview Rows feature allows you to inspect the data in your selected tables before building complex queries, helping you understand the available data and verify your selections.

Target Table Preview:

  • Click Preview rows of tables to open the preview dialog
  • View sample data from your primary (target) table
  • The preview shows the first 10 rows with all columns visible

JOIN Table Previews:

  • For each configured JOIN, a separate preview is available
  • View sample data from each joined table to verify the join will work as expected
  • Identify the correct columns to use in your ON conditions

Opening the full Database Viewer:

  • Every table preview panel (including the trigger and OPC UA method authoring "Available Database Tables" browsers) has an Preview Tables in Database Viewer link
  • Clicking it opens a dedicated Database Viewer in its own popup window — a real OS window on desktop, or a new browser tab/window in web mode — so you can keep browsing table rows without losing your place in the form you were editing
  • The Database Viewer is also reachable directly from the DB Viewer tab in the plant navigation, with no table preselected — see Chapter 11

14.3.4 Filter Conditions (UI Position 4)

Filter conditions allow you to restrict the query results to specific subsets of data based on column values.

Adding Filter Conditions:

  1. Expand the Filter Conditions section
  2. Click Add Condition to create your first filter
  3. Combine multiple conditions using AND/OR connectors

Available Operators:

Operator Description Data Types
= Equal to All types
≠ Not equal to All types
< Less than Numeric, DateTime
≤ Less than or equal to Numeric, DateTime
> Greater than Numeric, DateTime
≥ Greater than or equal to Numeric, DateTime
contains String contains substring (case-insensitive) String
is one of Value is one of multiple options All types
between Value is between two specified values Numeric, DateTime
is empty Column value is NULL or empty All types
is not empty Column value is not NULL or empty All types

Special Operators:

  • is one of: Enter a comma-separated list of values (e.g., IDLE,EXECUTING,STOPPED)
  • between: Enter two values separated by to (e.g., 10 to 100 or 2024-01-01 to 2024-12-31)
  • contains: Performs case-insensitive substring matching

Combining Conditions:

  • Use the AND/OR toggle to specify how conditions should be combined
  • Conditions are evaluated in the order they are listed
  • Complex logic can be built by nesting conditions with appropriate connectors

Example Filter Configuration: To find active orders on a specific machine:

  1. Column: machine_id, Operator: =, Value: 5
  2. Connector: AND
  3. Column: status, Operator: is one of, Value: IN_PROCESS,QUEUED

14.3.5 Sorting, Limit & Aggregation (UI Position 5)

This section allows you to control the order, quantity, and aggregation of query results.

Sorting:

  • Sort Column: Select which column to sort by
  • Sort Order: Choose Ascending (A→Z, 0→9) or Descending (Z→A, 9→0)

Limit & Offset:

  • Limit: Maximum number of rows to return (enter 0 for no limit)
  • Offset: Number of rows to skip before starting to return rows
  • Use Limit and Offset together for pagination of large result sets

Aggregation Functions: For numeric columns, you can apply aggregation functions to compute summary values:

Function Description Example
MAX Maximum value in the column Highest temperature recorded
MIN Minimum value in the column Lowest production count
COUNT Number of rows matching the query Total number of orders
SUM Sum of all values in the column Total parts produced
AVG Average value of the column Average cycle time

Latest Entry Preset:

  • Click Latest Entry to automatically configure the query for retrieving the most recent row
  • This preset sets: Sort by primary key or timestamp column, Descending, Limit = 1
  • Useful for getting the current status or latest reading from a sensor

Example Aggregation: To get the total parts produced by a specific machine:

  1. Select table: sfcs
  2. Select column: yield_quantity
  3. Add filter: machine_id = 5
  4. Aggregation: SUM

14.3.6 Formatting Options (UI Position 6)

Formatting options allow you to customize how the query result is presented and formatted.

Prefix and Suffix:

  • Prefix: Text to add before the value (e.g., Machine: )
  • Suffix: Text to add after the value (e.g., °C or pcs)
  • Useful for adding units, labels, or contextual information

Default Value:

  • Specify a fallback value to use when the query returns no rows
  • Example: Set default to N/A or 0 to ensure a value is always published
  • Prevents empty or NULL values from being published to external systems

Override Data Type:

  • Force the output to a specific data type for OPC UA compatibility
  • Useful when the database column type needs to be converted to match OPC UA type requirements
  • Available types: String, Int32, Int64, Float, Double, Boolean, DateTime

Example Formatting: To display a temperature value with proper units:

  • Prefix: (empty)
  • Suffix: °C
  • Default Value: 0
  • Override Data Type: Float

14.3.7 Live Preview (UI Position 7)

The Live Preview panel provides real-time feedback on your query configuration, allowing you to see the result as you build it.

Preview Panel:

  • Displays the current query result based on your configuration
  • Shows the actual value that will be published
  • Updates automatically as you change parameters

Live Updates:

  • The preview refreshes every time a configuration parameter changes
  • See immediate feedback on how JOINs, filters, sorting, and aggregation affect the result
  • No need to save and test separately

Error Messages:

  • Invalid configurations display clear error messages
  • Common errors include missing table/column selections, invalid JOIN conditions, or syntax issues
  • Error messages guide you to the specific problem that needs correction

Summary Badges:

  • The preview area displays summary badges showing:
    • Selected table
    • Selected column
    • Number of active filters
    • Number of JOINs configured
    • Aggregation function applied
  • This provides a quick overview of your current configuration

Tip: Use the Live Preview extensively while building complex queries to catch issues early and verify your configuration produces the expected results.


15. License Plan Feature Matrix

The following table shows the features available per plan. For the latest pricing and plan details, visit the MaConSim website:

https://maconsim.com/licenses-pricing/

Feature Free Trial Basic Premium
Users 1 3 Unlimited
Software Updates ✓ ✓ ✓
Technical Support — ✓ within 48 h (Mon–Fri 9–17) ✓ within 12 h (Mon–Fri 9–17)
Plants 1 3 Unlimited
Production Machines 2 10 Unlimited
Production Scenarios 1 10 Unlimited
Production Orders 1 10 Unlimited
NC Codes 3 10 Unlimited
Tools 2 10 Unlimited
Alerts 2 10 Unlimited
Data Collections 2 10 Unlimited
OPC UA (Server/Client) ✓ ✓ ✓
Import/Export OPC UA NodeSet2.xml file ✓ ✓ ✓
MQTT Broker ✓ ✓ ✓
REST API (only in Docker Version) ✓ ✓ ✓
Production Operator Dashboard ✓ ✓ ✓
History (Orders, NC Codes, Alerts) ✓ ✓ ✓
Plant Import — ✓ ✓

Exact limits are embedded in your license key and enforced automatically. Plan details on the website are always up to date.


16. REST API

MaConSim provides a REST API in its Docker version only that exposes all frontend functionality for programmatic access. This allows you to integrate MaConSim into test automation frameworks, CI/CD pipelines, or external MES/SCADA systems.

Important: The REST API is only available when running MaConSim via Docker. It is not accessible in the Windows, macOS, or Linux desktop versions.

Key characteristics:

  • Local access only: The REST API is designed for local clients only. No authentication is required as the API is not intended to be exposed to the internet.
  • Complete coverage: Every interaction available in the MaConSim frontend is also available through the REST API.
  • Automatic documentation: Full API documentation with interactive testing is available via Swagger UI.

Use cases:

  • Automated testing of MES functionalities that require a machine simulation environment
  • CI/CD pipeline integration for automatic testing before updates (MES, SCADA, or other IoT systems)
  • Custom integrations with external systems
  • Batch operations and automation scripts

16.1 Accessing the API

Swagger UI (Recommended): Open http://localhost:8080/swagger-ui#/ in your browser to explore all available endpoints interactively. Swagger UI provides:

  • Complete list of all endpoints
  • Detailed parameter documentation
  • Try-it-out functionality
  • Request/response examples

OpenAPI Specification: Download the machine-readable specification at /api-docs/openapi.json. This can be used for:

  • API client code generation
  • Integration with API documentation tools
  • Automated testing frameworks

Base URL: Docker deployment: http://localhost:8080

16.2 Usage Notes

Request Format: All endpoints use HTTP POST with a JSON request body.

Example request:

curl -X POST http://localhost:8080/api/get_plants \
  -H "Content-Type: application/json" \
  -d '{}'

Response Format:

  • Success: JSON with result data
  • Error: JSON with error message and HTTP error code

CORS: Cross-Origin Resource Sharing is configured to allow requests from any origin, making it easy to integrate from any local application.

Example: Export a Plant via API

# Export plant with ID 1
curl -X POST http://localhost:8080/api/export_plant_yaml \
  -H "Content-Type: application/json" \
  -d '{"plant_id": 1}' \
  --output plant-export.yaml

16.3 MCP Server (AI Agent Integration)

In addition to the REST API, MaConSim ships an MCP (Model Context Protocol) server that exposes the entire REST API to AI agents and AI-powered IDEs (such as VS Code with GitHub Copilot, or Claude Desktop). This lets an AI agent create plants, machines, orders, scenarios, alerts, and every other resource described in this manual simply by being asked in natural language — no manual REST calls required.

Important: Like the REST API, the MCP server requires a running maconsim-backend REST server. It is available for the Docker deployment and for local development builds; it is not bundled inside the desktop (Tauri) application itself.

16.3.1 What Is the MCP Server

The MCP server is a small companion process (maconsim-mcp-server) that:

  • Fetches the running backend’s OpenAPI specification (/api-docs/openapi.json) at startup.
  • Automatically registers one MCP tool per REST endpoint — every Tauri command / REST handler described throughout this manual (creating machines, orders, SFCs, alerts, OPC UA trees, MQTT brokers, etc.) is instantly available as an AI tool, with no per-endpoint code required.
  • Forwards each tool call as an HTTP POST straight through to /api/<operationId> on the backend, so the AI agent is really just driving the same REST API described in Section 16.

The server also tells the agent how MaConSim works when it connects (domain overview and typical workflows), and gives undocumented endpoints a generated description listing their arguments. One composite tool goes beyond the 1:1 mapping: create_opcua_tree_bulk creates an OPC UA tree together with all its nodes and references in a single all-or-nothing call.

The agent is also told how the part-level simulation works: each takt produces parts, scrap only comes from NC codes with a scrap disposition that are linked to the machine with a probability, and alerts and maintenances are linked the same way. It can read takts and parts (get_takts_by_machine, get_parts_by_sfc, …), record an NC code on a specific part (create_nc_code_occurrence with part_id), and complete a takt manually.

This means any new feature added to MaConSim’s REST API automatically becomes available to AI agents as soon as the backend is restarted — no additional configuration is needed.

16.3.2 Prerequisites

  • A running maconsim-backend REST server (see Section 16.1 / Section 3.4).
  • The maconsim-mcp-server binary, which is included in the Docker bundle (as the mcp-server service) and can also be built locally from source.

16.3.3 Running the MCP Server

Docker deployment: When you start MaConSim via docker compose up -d (see Section 3.4), the mcp-server service starts automatically alongside backend and frontend, listening over Streamable HTTP at:

http://localhost:8081/mcp

No extra steps are needed — the MCP server is always on as long as the Docker stack is running.

Local / development builds (stdio transport): When building from source, the MCP server can also run over stdio, which is the mode used by desktop MCP clients such as VS Code or Claude Desktop (the client spawns the binary itself and talks over its stdin/stdout):

cd rust-backend
MACONSIM_BACKEND_URL=http://localhost:8080 \
  cargo run -p maconsim-mcp-server --bin maconsim-mcp-server

To run the HTTP transport outside Docker instead:

cd rust-backend
MACONSIM_BACKEND_URL=http://localhost:8080 \
MACONSIM_MCP_TRANSPORT=http \
MACONSIM_MCP_HTTP_BIND=127.0.0.1:8081 \
  cargo run -p maconsim-mcp-server --bin maconsim-mcp-server

16.3.4 Configuration

The MCP server is configured via environment variables (or equivalent CLI flags):

Env var / flag Default Description
MACONSIM_BACKEND_URL / --backend-url http://localhost:8080 Base URL of the REST backend to proxy.
MACONSIM_MCP_USER_ID / --user-id unset Injected as user_id into any tool call whose arguments don’t already include one.
MACONSIM_MCP_TIMEOUT_SECS / --timeout-secs 30 HTTP timeout, in seconds, for calls to the backend. A connection that cannot be opened (for example while the backend restarts) is retried up to three times before the call fails.
MACONSIM_MCP_EXCLUDE_TOOLS / --exclude-tools unset Comma-separated extra tool names to hide, on top of the built-in defaults (see Section 16.3.6).
MACONSIM_MCP_ALLOW_TOOLS / --allow-tools unset Comma-separated tool names to expose even though they are on the built-in exclusion list (see Section 16.3.6).
MACONSIM_MCP_NO_DEFAULT_EXCLUSIONS / --no-default-exclusions false Disable the built-in destructive-endpoint exclusion list.
MACONSIM_MCP_TRANSPORT / --transport stdio stdio or http — see Section 16.3.3.
MACONSIM_MCP_HTTP_BIND / --http-bind 0.0.0.0:8081 Bind address for the http transport (ignored for stdio).

Setting MACONSIM_MCP_USER_ID for the Docker Compose mcp-server service without editing docker-compose-dev-build.yml: The mcp-server service reads MACONSIM_MCP_USER_ID via a ${MACONSIM_MCP_USER_ID:-1} substitution, so you can override it from the host environment instead of modifying the compose file:

  • Add it to a .env file at the repo root (copy from .env.example, which Docker/podman Compose auto-loads):
    MACONSIM_MCP_USER_ID=2
    
  • Or export it for a single run:
    MACONSIM_MCP_USER_ID=2 docker compose -f docker-compose-dev-build.yml up -d mcp-server
    

After changing the value, recreate the container (docker compose -f docker-compose-dev-build.yml up -d mcp-server, or down + up) so it picks up the new environment variable.

Overriding user_id per tool call (no restart needed): MACONSIM_MCP_USER_ID is only a default — it is injected into a tool call’s arguments only when the call doesn’t already include a user_id. Since most MaConSim tools accept user_id as a normal input field, you (or the AI agent) can simply ask for a different user explicitly and it takes precedence over the server’s default, with no server restart or configuration change required:

  • "Give me all the plants for user_id 1"
  • "Create a machine for user 3 in plant 2"

The agent passes the requested user_id straight through in the proxied REST call, e.g. {"user_id": 1} for get_plants.

16.3.5 Connecting an AI Agent

VS Code (stdio, local build): Point an MCP-capable client at the compiled binary over stdio, e.g. in VS Code’s mcp.json:

{
  "servers": {
    "maconsim": {
      "command": "/path/to/rust-backend/target/release/maconsim-mcp-server",
      "env": {
        "MACONSIM_BACKEND_URL": "http://localhost:8080"
      }
    }
  }
}

OpenCode (stdio, local build): OpenCode discovers MCP servers from an opencode.json config file (project-local or global at ~/.config/opencode/opencode.json). Add a local MCP server entry:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "maconsim": {
      "type": "local",
      "command": ["/path/to/rust-backend/target/release/maconsim-mcp-server"],
      "environment": {
        "MACONSIM_BACKEND_URL": "http://localhost:8080"
      },
      "enabled": true
    }
  }
}

Alternatively, point OpenCode at the always-on Streamable HTTP endpoint (Docker deployment) using a remote MCP server entry instead:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "maconsim": {
      "type": "remote",
      "url": "http://localhost:8081/mcp",
      "enabled": true
    }
  }
}

Restart OpenCode (or run opencode mcp if available in your version) to confirm the maconsim server connected and its tools are listed.

Any MCP client (Streamable HTTP, Docker deployment): Point your MCP client at the always-on HTTP endpoint:

http://localhost:8081/mcp

Once connected, the agent can discover and call tools such as create_machine, create_order, queue_sfc, create_alert, and every other operation exposed by the REST API — simply by describing the task in natural language (e.g. "create a plant called Demo Plant and add a CNC machine to it").

16.3.6 Tool Exclusions and Safety

By default, endpoints that are dangerous or irrelevant for an AI agent are hidden. The hidden groups are:

  • Sessions (login_user, logout_user, restore_session). login_user / logout_user change the backend’s single global session, which every client shares.
  • Stored secrets and certificates (get_opcua_tree_credentials, upload_client_certificate, delete_trusted_certificate).
  • Host-level side effects (download_update, check_for_updates, open_external_url).
  • UI branding (get_custom_logo, the customer logo as base64).
  • Raw table dumps (get_table_rows, get_mqtt_table_rows).

Never exposed, whatever you configure: every tool that writes the account or license table (create_user, delete_user, reset_password_with_master, verify_and_activate_license, replace_license, revalidate_license, validate_license_on_startup), the raw SQL trigger tools (create_trigger, update_trigger, delete_trigger, validate_trigger_sql) and the steps where a person approves what the agent wrote (approve_sql_trigger_template, activate_sql_trigger_template). MACONSIM_MCP_ALLOW_TOOLS and MACONSIM_MCP_NO_DEFAULT_EXCLUSIONS cannot re-enable them, and the backend refuses them for an agent as well. The account and license tables are also closed to everything else an agent or a script can drive: Python functions and flows only call the built-in actions (none touches them), SQL trigger templates cannot target them, and a data source query (and with it an OPC UA node write-back) cannot point at them.

Python functions are available to the agent (Section 9.3.1): create_python_function and update_python_function store its function (a function is usable as soon as it is saved, there is no approval step), call_python_function runs it, test_python_function_draft runs a low-code (flow) draft always and a Python draft only when the backend’s Python sandbox is strong (the embedded WASI interpreter; get_python_runtime_status shows it). The agent is told to prefer low-code functions. A script that breaks the sandbox rules (Section 9.3.2) is refused when it is created or edited, with every finding named by line; validate_python_function_draft shows the same findings without saving.

SQL triggers are available to the agent only as templates (Section 9.1.1): create_sql_trigger_template, update_sql_trigger_template, preview_sql_trigger_template, delete_sql_trigger_template, get_sql_trigger_templates, get_sql_trigger_events and deactivate_sql_trigger_template (marked destructive). The agent describes a trigger in a closed grammar and never writes SQL; its template stays pending and inactive until you review the generated SQL, approve it and activate it. The agent is told to prefer a no-code trigger plus a flow for "when X changes, do Y" and to use a template only when the reaction must happen inside the same database transaction.

Automation tools stay available: create_automation_flow, create_automation_button, create_automation_trigger, create_automation_display and list_watchable_tables only describe flows, evaluate_automation_display reads a display’s current value (a read-only dry run of its flow; marked read-only), and run_automation_flow (with dry_run: true for a test) and press_automation_button run flows that a user authored. The agent is told how functions, flows, buttons, displays and triggers relate. cancel_automation_run is marked destructive. create_database_display adds a database display (a value read through a database-reference query, Section 10.13.1; the query is run once to validate it, and accounts and licensing are refused) and evaluate_database_display reads its current value (read-only).

Every tool also carries MCP annotations so clients can tell safe from risky calls: get_*, list_* and similar tools are marked read-only; delete_*, clear_*, remove_* and import_opcua_tree_nodeset2, scrap_sfc and cancel_automation_run are marked destructive.

  • Re-enable single hidden tools with MACONSIM_MCP_ALLOW_TOOLS (comma-separated tool names).
  • Add further exclusions with MACONSIM_MCP_EXCLUDE_TOOLS (comma-separated tool names).
  • Disable the built-in exclusion list entirely with MACONSIM_MCP_NO_DEFAULT_EXCLUSIONS=true — only do this in trusted, non-production environments.

Security note: Like the REST API, the MCP server does not require authentication and is intended for this computer only. Docker Compose publishes ports 8080 (REST API) and 8081 (MCP) on 127.0.0.1 only, and the MCP server binds to 127.0.0.1 by default. Do not expose them to other machines or the internet.

What the backend refuses an agent, even when the tool list is widened. The MCP server labels every call it forwards with the header X-Maconsim-Origin: mcp. The backend uses the label to refuse actions that an agent must not take alone. The raw SQL trigger endpoints (create_trigger, update_trigger, delete_trigger, validate_trigger_sql) answer 403 Forbidden. A plant import (import_plant_yaml) from an agent is refused when the file contains raw SQL triggers; SQL trigger templates in it are imported as pending review, and Python functions import as they are. Use sql_trigger_templates or a no-code trigger that starts a flow instead of a raw SQL trigger. The label is not authentication: it protects as long as the agent reaches MaConSim only through MCP tools. An agent that can also run shell commands or HTTP requests against localhost:8080 can omit the header, so remove that access from the agent’s own configuration.

When a tool call breaks a database rule, the agent receives an explanation instead of a bare driver message, for example Foreign key violation: a referenced record does not exist (check every *_id in the request, e.g. plant_id, user_id, machine_id) …, Already exists: a record with the same unique value exists (…) or Missing required value (…). create_opcua_tree_bulk goes further and names the exact problem (for example plant_id 999 does not exist or NodeId ns=2;s=Press.x already exists in tree_id 3) before it writes anything.

16.3.7 Troubleshooting the MCP Server

What the server logs. The MCP server writes one log line per tool call to its standard error (with Docker Compose: docker logs maconsim-mcp-server). The line names the tool, the agent (client name and version), the names and the size of the arguments, how the call ended and how long it took. Argument values are never logged, because they can contain passwords. A successful call is an INFO line. A call that the backend rejected, that timed out or that could not reach the backend is a WARN line with the backend’s status and an excerpt of its error text. A call to a hidden tool or to a tool that does not exist is a WARN line that says which of the two it was; the agent is told unknown tool in both cases. Each retry of a refused connection to the backend is logged as well. All of these lines have the log target mcp_call: set RUST_LOG=info,mcp_call=warn to keep only the problems, or RUST_LOG=info,mcp_call=off to switch them off. RUST_LOG=info,rmcp=debug adds the protocol messages, including the full arguments and results of every call, so use it only while debugging and do not keep the output.

Symptom Solution
No tools are listed by the client Verify MACONSIM_BACKEND_URL points to a reachable, running maconsim-backend instance and that its OpenAPI spec is accessible at /api-docs/openapi.json.
Tool calls fail with connection errors Confirm the backend REST server is running and the port (default 8080) matches MACONSIM_BACKEND_URL.
A needed tool is missing Check whether it is in the default exclusion list or your own MACONSIM_MCP_EXCLUDE_TOOLS setting.
HTTP transport unreachable from an external client The server only listens on this computer: Docker Compose publishes it on 127.0.0.1:8081, and a native run binds to 127.0.0.1 unless MACONSIM_MCP_HTTP_BIND says otherwise. Reaching it from another machine is deliberately not supported because the server has no authentication.
Which calls did the agent make, and which of them failed? Read the server log and search for tool call failed and tool call refused. Each line carries the tool name, the status and the error text.
A call is slow or ends with outcome=timeout elapsed_ms in the call’s log line is how long the agent waited. timeout means the backend did not answer within MACONSIM_MCP_TIMEOUT_SECS (30 seconds by default). The backend may still have finished the work, so check the data before the agent repeats a write.

17. Updating MaConSim

MaConSim provides built-in functionality to check for and download new versions of the application.

17.1 Checking for Updates

  1. Click the Updates button in the top navigation bar (header section)
  2. MaConSim contacts the update server (https://api.maconsim.com/api/latest-version) to check if a newer version is available
  3. If your current version is up-to-date, a confirmation message appears briefly
  4. If a newer version is available, a notification banner appears displaying:
    • The available version number
    • Your current version number
    • A Download update button

Automatic checks: MaConSim automatically checks for updates once per session, approximately 3 seconds after you log in.

17.2 Downloading and Installing Updates

  1. When an update is available, click Download update in the notification banner

  2. The update installer is downloaded to your Downloads folder and automatically opened:

    • Windows: The EXE installer typically runs automatically; if it doesn’t, navigate to your Downloads folder and run the installer manually
    • macOS: The DMG file is mounted automatically
    • Linux: The AppImage or .deb package is opened with your system’s default handler
  3. Follow the installer prompts to complete the installation:

    • The installer will typically offer to remove the previous version
    • Your existing configuration and plant data are preserved in the database
  4. After installation completes, launch MaConSim as you normally would

Note: The update process is the same across all platforms — download the new installer from within the app, then run it to upgrade.

Before updating, it is strongly recommended to create backups:

  1. Export all plants using the Plant Export feature (Section 6.4)
  2. Export OPC UA NodeSet2 XML files for any OPC UA trees you’ve configured (Section 13.1.3)
  3. Backup your database file manually (optional but recommended):
    • Copy MaConSim.db from its location (see Section 2 for paths)

Why backup? While updates are designed to preserve your data, having backups ensures you can restore your configuration if any issues occur during the update process.

17.4 Troubleshooting Update Issues

If the application fails to start after updating:

  1. First try: Simply restart MaConSim — the database is typically preserved during normal updates

  2. If problems persist, you may need to reset the database:

    • Close MaConSim completely
    • Navigate to the database file location for your OS (Section 2):
    • Windows: C:\Users\{username}\AppData\Roaming\com.maconsim.app\MaConSim.db
    • macOS: ~/Library/Application Support/com.maconsim.app/MaConSim.db
    • Linux: ~/.local/share/com.maconsim.app/MaConSim.db
    • Rename the file to MaConSim.db.bak (this preserves it as a backup)
    • Launch MaConSim — a fresh database will be created
    • You will need to:
    • Reactivate your license (have your license key ready)
    • Create a new user account (Section 5.3)
    • Re-import your exported plants (Section 6.5)
    • Re-import your OPC UA NodeSet2 files if applicable

Important: Deleting the database file will permanently remove any data that was not exported. The Plant Export feature (Section 6.4) is the recommended way to back up your data.

If the update button doesn’t appear or doesn’t work:

  • Verify your internet connection is active
  • Check that outbound HTTPS connections to api.maconsim.com on port 443 are not blocked by your firewall
  • The update server might be temporarily unavailable — try again later

18. Troubleshooting

18.1 Application shows "License validation failed" on startup

  • No internet connection: The license server must be reachable at startup. Check your network and try restarting MaConSim.
  • Firewall blocking outbound connection: Ensure MaConSim is allowed to make outbound HTTPS connections through your firewall.
  • License expired: Contact MaConSim GmbH to renew your subscription.
  • License recently renewed or transferred: Click Re-activate on the error screen, enter your updated license key, and try again.

18.2 Import Plant button is greyed out

The Plant Import feature requires the importPlant entitlement, which is not included in the Free Trial. Contact MaConSim GmbH to upgrade to a Basic or Premium plan.


A button shows "Limit reached"

You have reached the maximum number of that resource type allowed by your plan. Options:

  • Delete unused items of that type to free up capacity.
  • Contact MaConSim GmbH to upgrade your plan.

See Chapter 15 for the limits per plan.


Simulation does not start when clicking Play

Ensure the following prerequisites are met:

  • The machine has at least one scenario connected (Section 8.1).
  • There is at least one SFC in the queue for the order (Section 8.2).
  • The machine is not already in a RUNNING state for another order process.

Produced parts count does not increase

  • Verify the Takt Time in the scenario is not set too high (e.g. milliseconds vs. minutes: 3,600,000 ms = 1 hour).
  • Check that the machine is in RUNNING state and not stuck in MAINTENANCE or ERROR.
  • The takt time is always in milliseconds: 60,000 = 1 minute, 3,600,000 = 1 hour.

Alerts, NC codes, or tools are not appearing in simulation output

Resources must be explicitly connected to the machine:


OPC UA server fails to start

The error banner above the tree list shows the reason returned by the backend (for example "Port 4840 is already in use by another application…" or "OPC UA tree ‘Production A’ has no root object…"). A server that fails to start is stopped again automatically, so you can fix the cause and press Start OPC UA Server again without restarting MaConSim.

  • No root object ("has no root object"): The OPC UA tree must contain at least one node, and the first one is the root Object. Navigate to Connectivity → OPC UA, select your tree, and click Create Root Object, then add child nodes (Section 13.1.5.1).
  • Root object missing although nodes exist ("contain each other in a loop"): Every object has a parent, so no object is at the top of the tree (for example A contains B and B contains A). The message lists the loop. Remove one of the references (or the node) so that one object has no parent.
  • Port in use: Another application (for example Kepware / UA Gateway on the same machine) or another OPC UA tree in MaConSim is already using the configured port. Change the port number in the OPC UA tree configuration or stop the other application. On Windows, netstat -ano | findstr :4840 shows which process owns the port.
  • Certificate (PKI) folder not writable: MaConSim stores its certificates in a pki folder. If the folder cannot be created, the error names the path; make sure the user running MaConSim can write there.
  • Firewall blocking the port: Ensure the configured port (default 4840) is allowed through Windows Firewall. Add an inbound rule for the port in Windows Defender Firewall settings.
  • Certificate error (Sign/SignAndEncrypt mode): Try stopping the server, deleting the PKI directory, and restarting. MaConSim will regenerate the certificates.

MQTT broker connection fails

  • Wrong host or port: Verify the broker hostname/IP and port exactly match your MQTT broker’s configuration.
  • Authentication: If your broker requires credentials, check that the username and password are entered correctly (case-sensitive).
  • TLS misconfiguration: Try disabling TLS first to isolate the issue. If TLS is required, ensure the broker’s certificate is valid.
  • Broker not running: Verify the MQTT broker is running and accessible from the MaConSim machine, e.g. using an MQTT client tool such as MQTT Explorer.
  • Firewall: Check that the configured port (default 1883, or 8883 for TLS) is not blocked.

Docker deployment issues

Symptom Likely cause Fix
POSTGRES_PASSWORD is required Missing or empty .env file Create .env with POSTGRES_PASSWORD=yourpassword
Cannot connect to the Docker daemon Docker not running Start Docker Desktop (or sudo systemctl start docker on Linux)
Backend container exits immediately Database not ready in time Run docker compose up again — the healthcheck will retry
Web UI shows network errors Wrong backend URL in image Ensure VITE_REST_API_URL=http://localhost:8080 in .env and that the backend is running
Port already in use (8080 / 1420 / 4840 / 1883 / 8883 / 5432) Another process occupies the port Stop the conflicting service, or edit the host port in docker-compose.yml or docker-compose-build.yml (left side of "host:container")
Images not found after docker compose up .tar files not loaded Run docker load -i maconsim-backend.tar and docker load -i maconsim-frontend.tar first

Database error on startup

The database file may be corrupted. To reset it:

  1. Close MaConSim completely.
  2. Navigate to the database file:
    • Windows: C:\Users\{username}\AppData\Roaming\com.maconsim.app\MaConSim.db
    • macOS: ~/Library/Application Support/com.maconsim.app/MaConSim.db
    • Linux: ~/.local/share/com.maconsim.app/MaConSim.db
  3. Rename the file to MaConSim.db.bak as a backup.
  4. Relaunch MaConSim. A fresh, empty database is created automatically.
  5. Re-import any plants you previously exported (Section 6.5).

Warning: Deleting or replacing the database permanently removes all plant data that was not exported. Back up your plant data regularly using the Plant Export feature (Section 6.4).


19. Help and Support

19.1 Opening the User Manual

A Help button is available in the header section of the application. Clicking this button opens the MaConSim User Manual in your default web browser, providing quick access to complete documentation for all application features.

19.2 Reporting a Bug or Contacting Support

A Support button is available in the header section of the application. This button allows you to report bugs or contact support directly from within the application.

To report a bug or contact support:

  1. Click the Support button in the header
  2. A dialog appears with the following fields:
Field Description Required
Type Select the category: Bug report for software issues, or Support request for general questions Yes
Email Your email address for follow-up Yes
Your notes Describe the problem or your request in detail Yes
  1. Fill in the required information and click Submit
  2. A confirmation message appears when your ticket has been successfully submitted

Requirements: An active license and an internet connection are required to submit a support ticket.


© 2026 MaConSim GmbH. All rights reserved. Public documentation for MaConSim users.