Skip to content

Repository files navigation

Industrial Labeling Process Simulator

CI Release .NET 10

Industrial Labeling Process Simulator is a .NET 10 console application that models the orchestration of an industrial labeling workflow without requiring physical production equipment.

The project demonstrates state-based process control, barcode validation, simulated device coordination, print-job preparation, physical-position confirmation, timeout handling, and fault recovery through replaceable ports and adapters.

Project status: The runnable baseline has been extracted into a dedicated four-project solution. The console simulation builds and runs locally, and all automated tests pass.

Simulation Preview

Successful industrial labeling simulation

The default scenario loads a two-position folding-box order, validates simulated barcode scans, waits for machine confirmations, and completes in OrderFinished.

Project Goals

  • model a realistic industrial labeling workflow as a testable state machine;
  • keep domain and process logic independent of console presentation and concrete hardware;
  • provide a deterministic local simulation using JSON data and fake devices;
  • demonstrate dependency inversion around scanners, machine controllers, laser markers, configuration, and order storage;
  • document the boundary between implemented simulation behavior and future production integration;
  • provide a clean, reviewable portfolio reference for industrial software architecture.

Solution Structure

IndustrialLabelingProcess.slnx
|
+-- IndustrialLabelingProcess.Core
+-- IndustrialLabelingProcess.Infrastructure
+-- IndustrialLabelingProcess.Console
`-- IndustrialLabelingProcess.Tests
  • IndustrialLabelingProcess.Core contains the domain model, process controller, state model, snapshots, and external-system ports.
  • IndustrialLabelingProcess.Infrastructure contains JSON repositories, settings, validation services, simulated devices, print-job creation, and the partial WAGO boundary.
  • IndustrialLabelingProcess.Console is the composition root and runnable simulation host.
  • IndustrialLabelingProcess.Tests contains unit and integration tests for process behavior and selected adapters.

Core Workflow

The simulation models the following process:

  1. identify and load an order;
  2. validate its key, label type, and positions;
  3. prepare the simulated machine, scanner, and laser marker;
  4. create and upload print jobs when required;
  5. start the process after checking modeled machine signals;
  6. validate scanned barcodes against the active order;
  7. wait for simulated physical position confirmation;
  8. update the confirmed processed quantity;
  9. finish the order or enter a defined fault state;
  10. reset a faulted process to Idle when recovery is requested.

Process States

The process controller uses these states:

Idle
LoadingOrder
OrderLoaded
PreparingDevices
ReadyToStart
Running
Paused
FinishingOrder
OrderFinished
Faulted

The detailed state transitions are documented in the architecture overview and the state-machine source.

Implemented Baseline

The extracted implementation provides:

  • JSON-based application configuration and sample orders;
  • a state-based ProcessController;
  • simulated machine-controller, barcode-scanner, and laser-marker adapters;
  • order and barcode validation;
  • duplicate and unknown-barcode detection;
  • print-job creation for configured label content;
  • pending physical confirmations;
  • deterministic timeout handling using TimeProvider;
  • pause, resume, controlled stop, finishing, fault, and reset behavior;
  • a partial WAGO adapter boundary behind IModbusClient;
  • unit and integration tests.

Technology Stack

  • .NET 10
  • C#
  • Microsoft.Extensions.DependencyInjection
  • Microsoft.Extensions.Logging
  • System.Text.Json
  • xUnit
  • Mermaid

Documentation

Local Development

From the repository root, restore, build, test, and run the application with:

dotnet restore .\IndustrialLabelingProcess.slnx
dotnet build .\IndustrialLabelingProcess.slnx --configuration Release --no-restore
dotnet test .\IndustrialLabelingProcess.slnx --configuration Release --no-build
dotnet run --project .\IndustrialLabelingProcess.Console\IndustrialLabelingProcess.Console.csproj

Configuration And Sample Data

The runnable simulation uses:

  • appsettings.json for safe local settings;
  • orders.json for reproducible sample orders and scan sequences;
  • simulated devices as the default runtime composition.

Tracked configuration must not contain production credentials, private infrastructure addresses, or secrets.

Known Boundaries

  • The console host uses simulation adapters.
  • Simulation.Enabled does not currently select a production composition.
  • Machine signals are not continuously monitored while the process is running.
  • Confirmation timeout checks require an external Tick() call.
  • WAGO input reading is a placeholder.
  • No concrete Modbus client is implemented.
  • No real scanner or laser-marker adapter is implemented.
  • No workflow-result or audit persistence is implemented.
  • No graphical user interface is included.
  • No functional-safety behavior is implemented.

Safety Notice

This repository is a simulator and architectural reference implementation. It is not production-ready machine-control software and does not implement certified safety functions.

Emergency stops, guards, interlocks, safe torque off, and other safety-critical behavior must be implemented independently through appropriate certified hardware, safety controllers, and validated engineering processes.

Future Extensions

Possible future extensions include:

  • a concrete Modbus TCP adapter;
  • machine-specific signal mappings;
  • continuous signal monitoring;
  • real scanner and laser-marker adapters;
  • persistent process results and audit events;
  • a WPF monitoring interface using MVVM;
  • production-specific dependency-injection profiles.

Future capabilities must not be presented as implemented until their code, tests, and documentation are present.

About

A .NET 10 console simulator for state-based industrial labeling workflows with JSON orders, simulated devices, barcode validation, WAGO boundaries, and automated tests.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages