A professional Modbus TCP/RTU/ASCII client/server application built with .NET 8.0 and WPF. ModbusForge provides comprehensive tools for testing, monitoring, and automating Modbus communications.
- Quick Start
- What's New
- Key Features
- Screenshots
- Installation
- Feature Details
- Modes: Client vs Server
- FAQ
- Contributing
- Build and Release
- Versioning
- Support
Get up and running with ModbusForge in 5 minutes.
dotnet run --project ModbusForgeChoose between Client or Server mode in appsettings.json:
{
"ServerSettings": {
"Mode": "Client",
"DefaultPort": 502,
"DefaultUnitId": 1
}
}- Enter the IP address of your Modbus TCP server
- Enter the port (default: 502)
- Enter the Unit ID (slave ID)
- For RTU/ASCII connections, click the gear icon and set the COM port, baud rate, data/stop bits, parity, and RTS (RS-485)
- Click Connect
- Select the Registers tab
- Enter the starting address and count
- Click Read
- Enable Continuous Read for automatic polling
- Options → Connection Manager: Save and manage multiple connection profiles
- Options → Device Scanner: Discover Modbus TCP devices on your network
- Options → Script Editor: Create automated test sequences
- Options → Preferences: Customize application behavior
- Help → Keyboard Shortcuts: View all available shortcuts
- Avalonia is now the primary release artifact for Windows and Linux.
- Windows Avalonia installer: New
setup/ModbusForge.Avalonia.issInno Setup script buildsModbusForge-Avalonia-{version}-setup.exefrom the self-containedpublish/avalonia/win-x64output. - Linux
.tar.gzpackaging:publish-avalonia.ps1now createspackages/ModbusForge-{version}-linux-x64-avalonia.tar.gzandpackages/ModbusForge-{version}-win-x64-avalonia.zipafter publishing. - Release pipeline updates:
.github/workflows/release.ymlnow publishes Avalonia for Windows and Linux, packages the artifacts, builds the Avalonia installer, and uploads the.zip,.tar.gz, checksums, and installer to GitHub Releases. - Version bumped to
2026.7.12in all projects.
- Address validation: New
IModbusAddressValidator/ModbusAddressValidatorvalidates unit ID, start address, and count/range before every Modbus operation.ModbusTcpServiceandModbusSerialServicenow reject out-of-bounds requests withArgumentOutOfRangeException, andMainViewModel.CanRead()disables the read command for invalid ranges. - Correlation IDs: New
ICorrelationContext/CorrelationContextwith async-local storage for tracing operations across async boundaries.ConnectionManagerstarts a new correlation ID and adds it toILoggerscopes when connecting a profile. - More Avalonia unit tests: Added
ModbusAddressValidatorTests,CorrelationContextTests, andPreferencesViewModelTests(plusFakeSettingsService).ModbusForge.Avalonia.Testsnow has 5 tests covering the main view, preferences, and validator.
- Application menu in Avalonia: Added File, Edit, View, Tools, and Help menus to
MainViewwith Save, Load, Exit, Read/Refresh, Preferences, Toggle Theme, Check for Updates, Help, Keyboard Shortcuts, Troubleshooting, and About commands. - Preferences window: Full Avalonia port with sections for Connection, Diagnostics, Console, Performance, Application, API (with API key generation), and MQTT. Persists through the existing
SettingsService. - Help, About, Keyboard Shortcuts, and Troubleshooting windows: Avalonia windows with content reused from the WPF implementation and core
IHelpContentService. - Global keyboard shortcuts:
Ctrl+R/F5read,Ctrl+Topen Trends,Ctrl+Ssave,Ctrl+Ppreferences,Ctrl+Qexit,F1help. - Theme toggle: Added
ToggleTheme()toIThemeServiceand implementations for WPF and Avalonia. - Auto-updater: Wired
IUpdateServiceinto Avalonia; checks GitHub releases for the latest tag and compares to the running version. On a newer release it offers to open the release page; the existingUpdateServicealso supports installer download and silent launch.
- Visual Simulation tab in Avalonia: Build, edit, and run node-based PLC simulations.
- Simulation engine and blocks moved to Core: Logic gates (AND, OR, NOT, RS), timers (TON, TOF, TP), counters (CTU, CTD, CTC), comparators, math (ADD/SUB/MUL/DIV), and signal generator blocks now run cross-platform.
- Node palette and data grid editor: Add nodes from the palette, edit X/Y and parameters, and wire them together in a connection grid.
- Live preview canvas: Nodes render on a scrollable canvas with current live values.
- Run/stop simulation: The
AvaloniaVisualSimulationServiceexecutes the graph against a localDataStoreon a 100 ms timer. .mfsimsave/load: Save and load simulation programs as JSON.
- Avalonia Script Editor: Create, edit, run, and stop Modbus scripts with a live output log.
- Script command types: read/write coils and registers, delay, log, plus advanced FC22 Mask Write, FC23 Read/Write Multiple, and FC43 Read Device Identification.
.mbscriptsave/load: Save and load script files as JSON.- Signal Generator tab: Generate ramp, sine, triangle, or square waveforms and write values to a holding register on a configurable period.
- Core
ScriptCommandandScriptRunnerextended to support the new advanced command types.
- Avalonia serial RTU/ASCII settings: Connection Manager now exposes COM port, baud rate, data bits, parity, stop bits, RTS, RTS toggle, and pre/post tx delays when a serial transport is selected.
- Connection profile persistence: Profiles are saved and reloaded across sessions.
- Frame Inspector tab: Live PDU/byte log with timestamp, delta, direction, unit ID, function code, and hex payload. Includes Clear and Pcap import buttons.
- Pcap import / offline replay: Import
.pcapfiles and view the extracted Modbus TCP frames directly in the Frame Inspector. - MQTT gateway tab: Configure broker host/port, client ID, credentials, topic template, QoS, retain, and publish period; connect and publish custom watch tag values.
- Live trend chart in Avalonia: Added a
Trendstab with aLiveChartsCartesian chart, Start/Stop/Remove/Clear controls, and a color-blind-safe palette. - Trend logging service integration:
TrendLoggingServiceis now registered in the Avalonia app and starts/stops with connection state. - Trend from Custom Watch: Any custom entry with the
Trendflag checked publishes its numeric/coil value to the trend chart while monitoring. - Retention and sample-rate control: Configure how many minutes of data to retain and how fast to sample.
- Avalonia Custom Watch tab: Add/remove custom tags with name, address, area, type, value, write value, and continuous/monitor/trend flags.
- Continuous custom monitoring: A background loop in the Avalonia app reads
Monitor-enabled and writesContinuous-enabled entries on their configured periods. - Custom read/write: Manual read and write buttons support
uint,int,real,string, and coil types, with proper byte/word handling for floats and strings. - Custom and project save/load: Save/load custom entry JSON files and full project
.mfp/.jsonfiles that restore connection profiles, active profile, register area, and custom entries. - Headless
--custom:ModbusForge.Headlessnow accepts--custom <path>to run a custom watch JSON file from the command line.
- Default startup project:
ModbusForge.Avaloniais now first inModbusForge.sln. - Cross-platform CI: Added GitHub Actions workflow to build and test Avalonia on Windows and Linux.
- Self-contained publishing: Validated
win-x64andlinux-x64single-file publishes.
- Auto-updater CalVer fix:
UpdateServicenow normalises 3-part release tags and 4-part assembly versions to a common 4-part form before comparing, so installed builds withAssemblyVersion=2026.7.1.0correctly compare against thev2026.7.1tag and future CalVer releases. - Added CalVer asset matching tests for
UpdateServiceto ensure the correctModbusForge-YYYY.M.INCREMENT-setup.exeinstaller is selected from GitHub releases.
- CalVer versioning: Switched from SemVer (
6.x.x) toYYYY.M.INCREMENTstarting with2026.7.1. - Cross-platform core extraction: New
ModbusForge.Coreclass library targetsnet8.0and contains the view-agnostic models, helpers, configuration and services (Modbus, polling, MQTT, pcap import, logging, etc.). - New
RgbColormodel: Replaced WPFSystem.Windows.Media.ColorinNodeDescriptorswith a portableRgbColorstruct; the WPF UI converts back when creating brushes. - Headless Linux runtime: New
ModbusForge.Headlessconsole app targetsnet8.0, usesModbusForge.Core, and polls Modbus TCP registers/coil/discrete-input areas from the command line with--host,--port,--unit-id,--start,--count,--intervaland--areaoptions. - Solution restructure:
ModbusForgeWPF app now referencesModbusForge.Core;ModbusForge.HeadlessandModbusForge.Coreadded to the solution.
- Channels-based background polling engine: New
PollingEngineruns Modbus reads off the WPF UI thread usingSystem.Threading.Channels.MonitoringCoordinatornow enqueuesPollingCommands, the worker executes the I/O, and results are drained and applied to the UI at 50ms ticks. Area commands coalesce by unit/area so only the latest pending request is processed under back-pressure. - Separated I/O from UI formatting:
RegisterCoordinatornow hasApply*methods for holding/input registers, coils and discrete inputs, letting the polling engine update collections on the UI thread without blocking it during Modbus transactions. - 50ms / 20-unit benchmark: Added
PollingThroughputTestsverifying 20 concurrent unit reads at 50ms intervals complete within one second.
- Fixed auto-updater installer asset selection and release workflow so only the versioned installer is uploaded; removed stale tracked
installers/ModbusForge-2.0.2-setup.exe.
- 32/64-bit byte & word swapping endianness matrix: Added
EndiannessFormat(ABCD,BADC,CDAB,DCBA) and converter methods forfloat,double,int,uint,long, andulong. The legacySwap Bytes/Swap Wordsflags now map to the same matrix. - RS-485 RTS toggle & line timing: Serial connections now support
EnableRtsToggle,PreTxDelayMs, andPostTxDelayMsinConnectionProfile, with controls in the Connection Manager. - Rockwell L5X, JSON and YAML register map importers:
RegisterTemplateImportServicenow auto-detects.json,.yaml/.ymland.l5xfiles; L5X<Tag>arrays are expanded into sequential virtual Modbus addresses. - PDU/byte frame inspector: A new
LoggingStreamResourcecaptures every transmitted and received Modbus byte[] with timestamps and inter-frame timing; open it fromOptions > Frame Inspector. - MQTT publisher:
MqttGatewayServicepublishes JSON snapshots of holding/input registers, coils, discrete inputs and custom entries to a configurable MQTT broker with auto-reconnect and topic templates; configured inPreferences. - Pcap import & offline replay:
PcapImportServicereads.pcapfiles (no Npcap required), extracts Modbus TCP frames on port 502 and displays them in the Frame Inspector for offline analysis.
- 32-bit float on holding and input (internal) registers: Holding and Input Register grids now decode
uint,int,real(32-bit float), andstringvalues. Input Registers get the same Swap Bytes / Swap Words controls as holding registers, and per-address Type and Swap settings are now saved in the.mfpproject file. - Live register value refresh: Changing the global Type or Swap settings immediately re-decodes and re-displays the current register values.
- Custom Watch continuous read: Added a Read checkbox and Read Period (ms) column for per-row continuous reads. The Custom Read toolbar toggle enables them; the existing Continuous Write column is now clearly labeled.
- Save All: The File menu now has a Save All option that saves the entire project, including every Unit ID, IP, port and tab.
- Continuous poll error handling: When a continuous read fails, the monitor for that area is paused and the error popup no longer re-appears immediately.
- Custom tag add: New custom tags now inherit the previous row's Type and Area, auto-increment the name, and advance the address by 2 for
uint/realtypes. - Console improvements: The console logs Modbus server requests with client IP, function code, address and count; UI register/coil writes; and visual simulation node value changes.
- Trend retention time: The Trend view Retention (min) setting now takes effect immediately when you click Apply. Existing trend data is re-trimmed to the new window and the chart values and CSV export samples stay in sync.
- Fixed startup crash (wpfgfx_cor3.dll EntryPointNotFoundException): Removed WPF native runtime DLLs from the installer. These DLLs are part of the shared
Microsoft.WindowsDesktop.Appruntime; shipping them with the app caused a mismatch when the installed .NET runtime was patched to a newer version, leading to a startupXamlParseException.
- Custom Watch separate write value: Added a new
Write Valuecolumn.Valueis now read-only and shows the live read value;Write Valueis used for one-shot writes and continuous writes. This lets trends/global monitoring keep reading while you write a different value.
- Visual Node Editor (ADD/COMPARE constant):
Const/Valvalues are now used whenInput2is not connected. Previously the unconnectedInput2was treated as a default coil address and read as 0. - One-click auto-update: When an update is found, you can now choose to download and install it automatically. The installer runs silently, closes the current application, replaces the files, and relaunches ModbusForge.
- Update checking: New Help → Check for Updates… menu item and optional Check for updates on startup preference. ModbusForge compares the running version against the latest GitHub release.
- Script Editor: Selection theming now uses the fluent DataGrid style so selected rows remain readable.
- Visual Node Editor (ADD block): Constant input (
CompareValue) is now used whenInput2is not connected. - Trends tab: Trend view correctly resolves its view model when loaded, so custom tags with trending enabled render again.
- Visual Node Editor (POU switching): Switching between programs (POUs) now saves the current nodes and wiring before loading another program, so wiring is no longer lost.
- Serial Modbus (RTU + ASCII): Added COM-port selection, baud/parity/data/stop bits, and RS-485 RTS toggle through the Connection Manager
- Updated README screenshots to reflect the current ModbusForge UI
- Comprehensive Help System: New searchable help window with F1 support
- Troubleshooting Tools: Built-in troubleshooting guide with diagnostic export
- Improved Keyboard Shortcuts: Expanded shortcut coverage with quick reference printing
- Modern Dialog Styling: About, Keyboard Shortcuts, Script Editor, and Troubleshooting windows now use Fluent UI
- Tab Stability: Removed accidental tab close buttons to prevent empty panes
- Better README: Restructured documentation with quick start, FAQ, and contributing sections
- Automatic Continuous Read: Trend lines now automatically enable continuous read when added
- Enhanced Error Logging: Specific exception handling with detailed logging
- Global Keyboard Shortcuts: Ctrl+R read, Ctrl+T trends, Ctrl+S save, F5 refresh, F1 help
- Improved Error Messages: User-friendly messages with recovery suggestions
- Centralized Resilience: Retry policy with exponential backoff and jitter
- Circuit Breaker Pattern: Prevents cascading connection failures
- Startup Configuration Validation: Schema validation for
appsettings.json - Validation Service: Input validation for IP addresses, ports, unit IDs, and registers
See FEATURE_ROADMAP.md for the full development roadmap.
- 🔌 Client & Server Modes: Switch between Modbus TCP client and server
- 🔗 Multiple Transports: Connect over TCP, RTU, or ASCII serial
- 📝 Full Register Support: Read/write holding registers, input registers, coils, and discrete inputs
- 📊 Real-time Monitoring: Continuous polling with configurable intervals
- 🔍 Connection Diagnostics: Test TCP/serial and Modbus connectivity with latency measurements
- 🧩 Advanced Function Codes: FC22 Mask Write Register, FC23 Read/Write Multiple Registers, FC43 Read Device Identification (client and server)
- 🛰️ Device Scanner: Sweep an IP range, a port range and unit IDs 1–247
- FC43 device identification reports vendor, product code and revision
- Function-code detection lists which of FC01-FC04 each unit implements
- Optional register-range probe on each discovered unit
- Save discovered devices straight into connection profiles, or export the scan as CSV
- Connect to multiple Modbus servers simultaneously
- Save and manage connection profiles
- Quick switching between active connections
- Profiles persist between sessions
- Visual script editor for creating test sequences
- Support for read/write operations, delays, and logging
- Run scripts with repeat counts and configurable delays
- Save/load scripts as
.mbscriptfiles
- 📈 Trend Charts: Real-time graphing with zoom/pan controls
- 📤 CSV/PNG Export: Export trend data and charts
- 🖥️ Console Logging: Real-time log of all Modbus operations
- Per-row configuration: Area, Type (uint/int/real/string)
- On-demand and continuous read/write
- Live value updates with trend integration
- Save/Load configurations to JSON
- 🎨 Visual Node Editor: Graphical programming for Modbus simulations
- 📶 Signal Generators: Ramp, Sine, Triangle, and Square waveforms
- 🔗 Node Connections: Wire nodes together to define data flow
- 🔄 Real-time Simulation: Execute simulations and monitor values
The main window provides a tabbed interface for registers, coils, custom data, simulation, trends, and console logging.
Save and manage multiple Modbus connection profiles with quick connect/disconnect capabilities.
Create and run automated test sequences with a visual command editor.
The Simulation tab provides a visual node editor with a node palette and simulation controls for building signal-generation and Modbus-output simulations.
Monitor register values over time with real-time graphing, zoom, pan, and export capabilities.
When you download and run the installer for ModbusForge, Windows Defender SmartScreen will likely show a warning because the application is not digitally signed with a commercial certificate.
To install the application, follow these steps:
- Run the
ModbusForge-x.x.x-setup.exeinstaller. - Windows will show a blue window titled "Windows protected your PC".
- Click on the More info link.
- The publisher will be listed as "Unknown". Click the Run anyway button to proceed with the installation.
Access via Options → Connection Manager
- Create, edit, and delete connection profiles
- Choose transport: TCP, RTU, or ASCII
- TCP profiles store: Name, IP Address, Port, Unit ID
- Serial profiles store: Name, COM Port, Baud Rate, Data Bits, Parity, Stop Bits, RTS, Unit ID
- Connect/disconnect individual profiles
- Set active connection for main window operations
- Profiles saved to
%AppData%\ModbusForge\connection-profiles.json
When creating an RTU or ASCII connection:
- Select RTU or ASCII from the Transport dropdown
- Enter the COM Port your device is attached to (e.g.
COM3) - Set the Baud Rate (commonly
9600or115200) - Set the Data Bits (
7or8) - Set the Parity (
None,Even,Odd,Mark, orSpace) - Set the Stop Bits (
One,OnePointFive, orTwo) - Enable RTS if your RS-485 adapter requires Request-to-Send toggle
- Enter the Unit ID and click Connect
Serial profiles use the same read/write register and coil operations as TCP profiles, with 1-based addresses converted to the 0-based Modbus protocol addresses automatically.
Access via Options → Device Scanner...
Scans an inclusive IPv4 range (up to 4096 addresses) across a port range (up to 64 ports) and any subset of unit IDs 1–247, using a short-lived connection per endpoint so live polling is never disturbed.
Scan settings
- Start/End IP, Port from/to, Unit ID from/to
- Register type and probe address used for detection
- Connect and response timeouts, and the number of endpoints probed in parallel
- Read device identification (FC43) for vendor, product code and revision
- Detect function codes (FC01-FC04) reads one item from each register space to work out which read functions a unit implements; a unit that answers illegal data address still counts as implementing the function, only illegal function excludes it
- Scan register range to list which addresses of a discovered unit are readable
Results
- Status per unit:
Responded,RespondedWithException(device present but the address is unsupported),NoModbusResponse(port open, unit silent) orNoTcpConnection - Add to Profiles stores the selected device in
connection-profiles.json - Function codes column shows the detected read functions, e.g.
FC03, FC04 - Export CSV writes one row per device plus one row per scanned register
- Scans report progress and can be stopped at any time; results found so far are kept
Access via Options → Script Editor or press Ctrl+E
Supported Commands:
- Read Holding Registers / Input Registers
- Read Coils / Discrete Inputs
- Write Single Register / Coil
- Delay (configurable milliseconds)
- Log messages
Script Settings:
- Repeat count for looping
- Delay between commands
- Stop on error option
Output Log: Real-time execution feedback
See docs/SCRIPTING_GUIDE.md for detailed scripting documentation.
Access via Options → Preferences
- Auto-reconnect on connection loss
- Show diagnostics on connection error
- Console logging settings
- Confirm before exit
- Check for updates on startup
- Settings saved to
%AppData%\ModbusForge\settings.json
Access via Help → Check for Updates…
ModbusForge checks the latest GitHub release against the running version.
- Manual check: open the menu item at any time.
- Automatic check: enable
Check for updates on startupin Preferences. - When a newer version is found, choose Yes to download and install it automatically, No to open the release page in your browser, or Cancel to close the dialog.
- The installer is downloaded to your temp folder, runs silently, closes the running application, installs the update, and relaunches ModbusForge.
- If the app is already on the latest release or the check cannot reach GitHub, a brief message is shown.
- Area Types: HoldingRegister, Coil, InputRegister, DiscreteInput
- Data Types: uint, int, real (32-bit float), string
- On-demand Read/Write buttons per row
- Continuous Write mode per row
- Live reads when Global Continuous Read is enabled
- Save/Load configurations to JSON
Import a vendor register map from the Tag Browser → Import Template button. The preview dialog shows every parsed row, highlights rejected rows in red and warning rows in amber, and only imports the rows that validated. CSV Template writes an example file to fill in.
Supported columns (header names are matched case-insensitively, ignoring spaces, _ and -;
common vendor synonyms such as Tag, Register, Register Type, Comment, EU are accepted):
| Column | Meaning |
|---|---|
TagName (required) |
Tag name |
Address (required) |
Register address, interpreted using the selected addressing convention |
Description, Group |
Description and tag group |
RegisterType |
Holding / Input / Coil / Discrete (also HR, IR, 4x, 3x, 0x, 1x) |
Bit |
Bit index 0–15 within a packed status word |
DataType |
Bool, Int16, UInt16, Int32, UInt32, Float/Real, Double, String |
WordOrder |
BigEndian/ABCD or LittleEndian/CDAB (word-swapped) |
Length |
Registers occupied; defaults to the data type width |
Scale, Offset, Unit |
Engineering-unit conversion applied to polled and written values |
Access |
r / ro (read-only) or rw |
Enum |
0=Off;1=On — displayed instead of the raw value |
Default |
Default value |
Range |
0..100 (or separate Min/Max columns) — used as the alarm limits |
Addressing conventions: 0-based (protocol address), 1-based (address − 1) and
Modicon (40001 → holding register 0, 30001 → input register 0, 10001 → discrete
input 0, 000001 → coil 0; 6-digit forms are also supported).
Example:
TagName,Description,Group,RegisterType,Address,Bit,DataType,WordOrder,Length,Scale,Offset,Unit,Access,Enum,Default,Range
VFD_OutputFreq,Output frequency,VFD,Holding,40001,,UInt16,BigEndian,1,0.01,0,Hz,r,,,0..60
VFD_Current,Motor current,VFD,Holding,40002,,Float,CDAB,2,0.1,0,A,r,,,0..120
VFD_Command,Command word,VFD,Holding,40010,,UInt16,BigEndian,1,1,0,,rw,0=Stop;1=Run;2=Jog,0,
VFD_FaultBit,Fault bit of status word,VFD,Holding,40011,5,Bool,BigEndian,1,1,0,,r,0=Ok;1=Fault,,Imported templates are stored as JSON in %AppData%\ModbusForge\templates\ so they can be
reused, edited or shared. Excel (.xlsx) files are read from the first worksheet.
Open Options → Advanced Functions... to use the protocol functions that go beyond the standard read/write set. All addresses are 1-based, exactly like the rest of the UI.
| Function | What it does | Inputs |
|---|---|---|
| FC22 - Mask Write Register | Atomically sets/clears bits of one holding register: result = (current AND andMask) OR (orMask AND NOT andMask) |
Address, AND mask, OR mask |
| FC23 - Read/Write Multiple Registers | Writes a block of registers and reads a (possibly different) block in a single transaction; the write happens first | Read address/count, write address, comma-separated values (0x prefix for hex) |
| FC43 / MEI 14 - Read Device Identification | Queries the device identity strings (vendor, product code, revision, vendor URL, product name, model, application) | Category: Basic, Regular or Extended |
The result of each call, or the Modbus exception returned by the device, is shown in the status bar at the bottom of the dialog; FC43 objects are listed in a grid.
In server mode ModbusForge answers all three functions as well. The identity served by FC43 defaults to the ModbusForge vendor/product strings and the running application version.
The same operations are available programmatically through IModbusService:
ushort? result = await modbusService.MaskWriteRegisterAsync(unitId: 1, registerAddress: 5, andMask: 0x00F2, orMask: 0x0025);
ushort[]? read = await modbusService.ReadWriteMultipleRegistersAsync(1, readStartAddress: 1, readCount: 4, writeStartAddress: 10, writeValues: new ushort[] { 1, 2 });
DeviceIdentification? id = await modbusService.ReadDeviceIdentificationAsync(1, DeviceIdObject.VendorName, DeviceIdCategory.Basic);- Real-time trend charts with zoom/pan
- Adjustable retention window (1–60 minutes)
- Export to CSV or PNG
- Console tab shows all Modbus operations
Access via the Simulation tab or left navigation panel.
- Drag nodes from the palette onto the canvas
- Connect nodes by dragging from outputs to inputs
- Configure node parameters in the properties panel
- Run simulations and monitor real-time values
Configure in ModbusForge/ModbusForge/appsettings.json under ServerSettings:
Mode:ClientorServerDefaultPort,DefaultUnitId, etc.
Both client and server services are registered; the MainViewModel selects the IModbusService implementation at runtime based on Mode.
Connect to an existing Modbus TCP server. Use this for testing and monitoring real devices.
Act as a Modbus TCP server for testing client applications. Configure the listening port and allowed Unit IDs.
A: ModbusForge is built for Windows 10 and Windows 11 using WPF and .NET 8.0.
A: Only if you use the default Modbus port 502. Windows requires admin privileges to bind to ports below 1024. You can use a higher port number (e.g., 1502) to avoid this.
A: Yes, use the Connection Manager to create and manage multiple profiles. You can switch between active connections.
A: Application settings are saved to %AppData%\ModbusForge\settings.json. Connection profiles are saved to %AppData%\ModbusForge\connection-profiles.json.
A: Open the Trend tab and use the Trend menu to export to CSV or PNG.
A: Scripts are saved as .mbscript files in JSON format.
A: Verify the IP address, port, and Unit ID. Ensure the device is reachable on the network and that your firewall allows the connection. Use the Connection Manager diagnostics or Help → Troubleshooting for more guidance.
A: Yes, ModbusForge is open source. See the LICENSE file for details.
We welcome contributions to ModbusForge! Here are some ways you can help:
- Check existing issues first to avoid duplicates
- Provide detailed steps to reproduce the problem
- Include your ModbusForge version, Windows version, and .NET version
- Attach screenshots or logs if applicable
- Open a GitHub issue with the
enhancementlabel - Describe the feature and its use case
- Include mockups or examples if possible
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes following the existing code style
- Add tests if applicable
- Commit with clear messages
- Push to your fork and open a Pull Request
- Use
ILoggerfor all logging (noDebug.WriteLineor custom file logging) - Use constants for magic numbers
- Implement proper event handler cleanup to prevent memory leaks
- Add input validation with visual feedback for user inputs
Below are PowerShell commands tested on Windows to produce a Release build and package artifacts.
- .NET 8.0 SDK
- Visual Studio 2022 (17.0 or later) with .NET desktop development workload (optional)
dotnet clean
dotnet restore
dotnet build ModbusForge.sln -c Release$version = "5.8.7"
dotnet publish .\ModbusForge\ModbusForge.csproj -c Release -r win-x64 --self-contained false -p:PublishSingleFile=true -p:PublishTrimmed=false -o .\publish\win-x64$version = "5.8.7"
dotnet publish .\ModbusForge\ModbusForge.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishTrimmed=false -o .\publish\win-x64-sc$version = "5.8.7"
Compress-Archive -Path .\publish\win-x64\* -DestinationPath .\ModbusForge-$version-win-x64.zip -Force
# or for self-contained
Compress-Archive -Path .\publish\win-x64-sc\* -DestinationPath .\ModbusForge-$version-win-x64-sc.zip -Force& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "setup\ModbusForge.iss"- The window title displays the application version from the assembly ProductVersion
- Versions follow Semantic Versioning
- See FEATURE_ROADMAP.md for planned releases
- GitHub Issues: https://github.com/nokkies/ModbusForge/issues
- Email: reinach@softwareForge.cc
- Documentation: See the
docs/folder and in-app Help (F1)
Built by Reinach van Nieuwenhuizen
