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.
The default scenario loads a two-position folding-box order, validates simulated barcode scans, waits for machine confirmations, and completes in OrderFinished.
- 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.
IndustrialLabelingProcess.slnx
|
+-- IndustrialLabelingProcess.Core
+-- IndustrialLabelingProcess.Infrastructure
+-- IndustrialLabelingProcess.Console
`-- IndustrialLabelingProcess.Tests
IndustrialLabelingProcess.Corecontains the domain model, process controller, state model, snapshots, and external-system ports.IndustrialLabelingProcess.Infrastructurecontains JSON repositories, settings, validation services, simulated devices, print-job creation, and the partial WAGO boundary.IndustrialLabelingProcess.Consoleis the composition root and runnable simulation host.IndustrialLabelingProcess.Testscontains unit and integration tests for process behavior and selected adapters.
The simulation models the following process:
- identify and load an order;
- validate its key, label type, and positions;
- prepare the simulated machine, scanner, and laser marker;
- create and upload print jobs when required;
- start the process after checking modeled machine signals;
- validate scanned barcodes against the active order;
- wait for simulated physical position confirmation;
- update the confirmed processed quantity;
- finish the order or enter a defined fault state;
- reset a faulted process to
Idlewhen recovery is requested.
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.
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.
- .NET 10
- C#
- Microsoft.Extensions.DependencyInjection
- Microsoft.Extensions.Logging
- System.Text.Json
- xUnit
- Mermaid
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.csprojThe runnable simulation uses:
appsettings.jsonfor safe local settings;orders.jsonfor 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.
- The console host uses simulation adapters.
Simulation.Enableddoes 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.
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.
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.
